def get_method_sig(method):
<EOL>argspec = inspect.getargspec(method)<EOL>arg_index=<NUM_LIT:0><EOL>args = []<EOL>for arg in argspec.args:<EOL><INDENT>default_arg = _get_default_arg(argspec.args, argspec.defaults, arg_index)<EOL>if default_arg.has_default:<EOL><INDENT>val = default_arg.default_value<EOL>if isinstance(val, str):<EOL><INDENT>val = '<STR_LIT:">' + val + '<STR_LIT:">'<EOL><DEDENT>args.append("<STR_LIT>" % (arg, val))<EOL><DEDENT>else:<EOL><INDENT>args.append(arg)<EOL><DEDENT>arg_index += <NUM_LIT:1><EOL><DEDENT>if argspec.varargs:<EOL><INDENT>args.append('<STR_LIT:*>' + argspec.varargs)<EOL><DEDENT>if argspec.keywords:<EOL><INDENT>args.append('<STR_LIT>' + argspec.keywords)<EOL><DEDENT>return "<STR_LIT>" % (method.__name__, "<STR_LIT:U+002CU+0020>".join(args[<NUM_LIT:1>:]))<EOL>
Given a function, it returns a string that pretty much looks how the
    function signature would be written in python.

    :param method: a python method
    :return: A string similar describing the pythong method signature.
    eg: "my_method(first_argArg, second_arg=42, third_arg='something')"