def ssn(self) -> str:
        """
        Mexican Social Security Number, as given by IMSS.

        :return: a random Mexican SSN
        """
        office = self.random_int(min=1, max=99)
        birth_year = self.random_int(min=0, max=99)
        start_year = self.random_int(min=0, max=99)
        serial = self.random_int(min=1, max=9999)

        num = f"{office:02d}{start_year:02d}{birth_year:02d}{serial:04d}"

        check = ssn_checksum(map(int, num))
        num += str(check)

        return num

        Mexican Social Security Number, as given by IMSS.

        :return: a random Mexican SSN
        
faker/providers/ssn/es_MX/__init__.py