human
I wrote the below code

    open(fname, 'a').close()
    FILENAME = fname
    CLASS = some_class
    PREFIX = '--[    %(asked)s    /    %(called)s    /    %(defined)s    ]--'
    if (prefix != None):
        PREFIX = prefix
    MAXWIDTH = {'o_O': 10}
    def format_prefix(method, methodobj):
        '\n                                --[    ShellBase    /    Internal    /    BaseEdit    ]-------    get_position\n                                '
        classnames = {'asked': CLASS.__name__, 'called': methodobj.__class__.__name__, 'defined': get_class_that_defined(method)}
        line = (PREFIX % classnames)
        MAXWIDTH['o_O'] = max(len(line), MAXWIDTH['o_O'])
        return line.ljust(MAXWIDTH['o_O'], '-')
    import types
    def __getattribute__(self, name):
        attr = object.__getattribute__(self, name)
        if (type(attr) is not types.MethodType):
            return attr
        else:
            def newfunc(*args, **kwargs):
                log = open(FILENAME, 'a')
                prefix = format_prefix(attr, self)
                log.write(('%s    %s\n' % (prefix, name)))
                log.close()
                result = attr(*args, **kwargs)
                return result
            return newfunc
    some_class.__getattribute__ = __getattribute__

What's a good function header?

=====
Can you provide a Python program to fix != None):?
assistant
#Here is Python program to fix != None):
.

def log_methods_calls(fname, some_class, prefix=None):