def METHOD_NAME(self):
    divisions = OrganisationDivision.objects.filter(
        territory_code__in=["", None]
    ).filter(official_identifier__startswith="gss:")
    for division in divisions:
        gss_prefix = division.official_identifier.split(":")[1][0]
        division.territory_code = GSS_TO_NATION[gss_prefix]
        division.save()