def get_full_typename(o):
    """We determine types based on type names so we don't have to import
    (and therefore depend on) PyTorch, TensorFlow, etc.
    """
    instance_name = o.__class__.__module__ + '.' + o.__class__.__name__
    if instance_name in ['builtins.module', '__builtin__.module']:
        return o.__name__
    else:
        return instance_name
