def METHOD_NAME(model_instance) -> str:
    """
    Returns the admin URL for the given Django instance. If the instance has
    an 'admin_url' property, that is given priority.
    """
    admin_url = getattr(model_instance, "admin_url", None)
    if isinstance(admin_url, str):
        return admin_url
    return get_admin_url_for_instance_or_class(model_instance, model_instance.pk)