def _printable_name(model_obj):
    """Returns a print-frendly name for a model object.

    :param model_obj: a model, schema, table, column, key, or foreign key object.
    :return: string representation of its name or "catalog" if no name found
    """
    if not hasattr(model_obj, 'name'):
        return 'catalog'
    if hasattr(model_obj, 'constraint_name'):
        return "%s:%s" % model_obj.name
    if hasattr(model_obj, 'table'):
        return "%s:%s:%s" % (model_obj.table.schema.name, model_obj.table.name, model_obj.name)
    if hasattr(model_obj, 'schema'):
        return "%s:%s" % (model_obj.schema.name, model_obj.name)
    if hasattr(model_obj, 'name'):
        return model_obj.name
    return 'unnamed model object'