def postcode_in_province(self, province_abbr: Optional[str] = None) -> str:
        """
        Returns a random postcode within the provided province abbreviation
        """
        if province_abbr is None:
            province_abbr = self.random_element(self.provinces_abbr)

        if province_abbr in self.provinces_abbr:
            postal_code_format: str = self.random_element(self.postal_code_formats)
            postal_code_format = postal_code_format.replace(
                "?",
                self.generator.random_element(self.provinces_postcode_prefixes[province_abbr]),
                1,
            )
            return self._postcode_replace(postal_code_format)
        else:
            raise Exception("Province Abbreviation not found in list")

        Returns a random postcode within the provided province abbreviation
        
faker/providers/address/en_CA/__init__.py