def METHOD_NAME(type_):
    """Returns a string representation of a NetboxType for logging use. Should work
    with both ORM models and Shadow instances, as well as None values.
    """
    if not type_:
        return UNKNOWN_TYPE_ID
    else:
        return "{} ({})".format(type_.name, type_.vendor.id)