def METHOD_NAME(apps, schema_editor):
    """Reverse Namespace migrations."""
    Namespace = apps.get_model("ipam", "Namespace")
    VRF = apps.get_model("ipam", "VRF")
    VRFDeviceAssignment = apps.get_model("ipam", "VRFDeviceAssignment")
    IPAddress = apps.get_model("ipam", "IPAddress")
    Prefix = apps.get_model("ipam", "Prefix")
    Interface = apps.get_model("dcim", "Interface")
    VMInterface = apps.get_model("virtualization", "VMInterface")
    ns_global = Namespace.objects.get(name="Global")
    Prefix.objects.update(namespace=ns_global)
    VRF.objects.update(namespace=ns_global)
    Namespace.objects.exclude(name=ns_global.name).delete()
    # Reset VRF-to-device/VM assignments.
    VRFDeviceAssignment.objects.all().delete()
    # Clear vrf from [VM]Interface objects.
    Interface.objects.update(vrf=None)
    VMInterface.objects.update(vrf=None)
    # Clear parenting.
    IPAddress.objects.update(parent=None, ip_version=None)
    Prefix.objects.update(parent=None, ip_version=None)
    # Remove objects created by migrations.
    Prefix.objects.filter(description__startswith="Created by Nautobot").delete()
    for vrf in VRF.objects.filter(description__startswith="Created by Nautobot"):
        original_vrf = (
            VRF.objects.exclude(description__startswith="Created by Nautobot")
            .filter(name=vrf.name, rd=vrf.rd, tenant=vrf.tenant)
            .first()
        )
        Prefix.objects.filter(vrf=vrf).update(vrf=original_vrf)
        vrf.delete()