def drop_prefix_and_return_type(function):
DELIMITERS = {<EOL>'<STR_LIT:(>': '<STR_LIT:)>',<EOL>'<STR_LIT:{>': '<STR_LIT:}>',<EOL>'<STR_LIT:[>': '<STR_LIT:]>',<EOL>'<STR_LIT:<>': '<STR_LIT:>>',<EOL>'<STR_LIT>': "<STR_LIT:'>"<EOL>}<EOL>OPEN = DELIMITERS.keys()<EOL>CLOSE = DELIMITERS.values()<EOL>tokens = []<EOL>levels = []<EOL>current = []<EOL>for i, char in enumerate(function):<EOL><INDENT>if char in OPEN:<EOL><INDENT>levels.append(char)<EOL>current.append(char)<EOL><DEDENT>elif char in CLOSE:<EOL><INDENT>if levels and DELIMITERS[levels[-<NUM_LIT:1>]] == char:<EOL><INDENT>levels.pop()<EOL>current.append(char)<EOL><DEDENT>else:<EOL><INDENT>current.append(char)<EOL><DEDENT><DEDENT>elif levels:<EOL><INDENT>current.append(char)<EOL><DEDENT>elif char == '<STR_LIT:U+0020>':<EOL><INDENT>tokens.append('<STR_LIT>'.join(current))<EOL>current = []<EOL><DEDENT>else:<EOL><INDENT>current.append(char)<EOL><DEDENT><DEDENT>if current:<EOL><INDENT>tokens.append('<STR_LIT>'.join(current))<EOL><DEDENT>while len(tokens) > <NUM_LIT:1> and tokens[-<NUM_LIT:1>].startswith(('<STR_LIT:(>', '<STR_LIT>')):<EOL><INDENT>tokens = tokens[:-<NUM_LIT:2>] + ['<STR_LIT:U+0020>'.join(tokens[-<NUM_LIT:2>:])]<EOL><DEDENT>return tokens[-<NUM_LIT:1>]<EOL>
Takes the function value from a frame and drops prefix and return type

    For example::

        static void * Allocator<MozJemallocBase>::malloc(unsigned __int64)
        ^      ^^^^^^ return type
        prefix

    This gets changes to this::

        Allocator<MozJemallocBase>::malloc(unsigned __int64)

    This tokenizes on space, but takes into account types, generics, traits,
    function arguments, and other parts of the function signature delimited by
    things like `', <>, {}, [], and () for both C/C++ and Rust.

    After tokenizing, this returns the last token since that's comprised of the
    function name and its arguments.

    :arg function: the function value in a frame to drop bits from

    :returns: adjusted function value