def type_to_codename(type_):
    """Return string representing type.

    Parameters
    ==========
    type_ (any Python value; usually a type)
        type_ for which a suitable codename will be
        picked or a default will be returned.
    """
    ### try obtaining a frozenset from the type_ received

    try:
        type_ = frozenset(type_)
    except:
        pass

    ### regardless of whether the attemp above succeed
    ### or not, get the style objects from the map if
    ### the type_ is present, otherwise use 'other'
    return TYPE_TO_CODENAME_MAP.get(type_, "other")
Return string representing type.

    Parameters
    ==========
    type_ (any Python value; usually a type)
        type_ for which a suitable codename will be
        picked or a default will be returned.
    
nodezator/graphman/socket/surfs.py