def formatannotation(annotation, base_module=None):
    if isinstance(annotation, type):
        if annotation.__module__ in ('builtins', '__builtin__', base_module):
            return annotation.__name__
        return annotation.__module__+'.'+annotation.__name__
    return repr(annotation)
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/externals/funcsigs.py/formatannotation/original