'Returns a string description of the type of a function'

def explain_function_type(self, func):

    desc = []
    defns = []
    param = False
    if isinstance(func, types.Callable):
        (sigs, param) = func.get_call_signatures()
        defns.extend(sigs)
    elif (func in self._functions):
        for tpl in self._functions[func]:
            param = (param or hasattr(tpl, 'generic'))
            defns.extend(getattr(tpl, 'cases', []))
    else:
        msg = 'No    type    info    available    for    {func!r}    as    a    callable.'
        desc.append(msg.format(func=func))
    if defns:
        desc = ['Known    signatures:']
        for sig in defns:
            desc.append('    *    {0}'.format(sig))
    if param:
        desc.append('    *    parameterized')
    return '\n'.join(desc)
