def METHOD_NAME(domain):
    previous = None
    for name, administrative in [
        ('state', True),
        ('district', True),
        ('block', True),
        ('village', True),
        ('outlet', False),
    ]:
        location_type, _ = LocationType.objects.get_or_create(
            domain=domain,
            name=name,
            defaults={
                'parent_type': previous,
                'administrative': administrative,
            },
        )
        previous = location_type