def object_to_primitive(obj):
    """
    Converts an object into a string using the class name

    Args:
        obj: the object to convert.

    Returns:
        A string representing the object.

    """
    if isinstance(obj, type):
        return obj.__name__
    else:
        return type(obj).__name__