@time_cache('call_signatures_validity')
def cache_call_signatures(evaluator, bracket_leaf, code_lines, user_pos):
 index = (user_pos[0] - 1)
 before_cursor = code_lines[index][:user_pos[1]]
 other_lines = code_lines[bracket_leaf.start_pos[0]:index]
 whole = '\n'.join((other_lines + [before_cursor]))
 before_bracket = re.match('.*\\(', whole, re.DOTALL)
 module_path = bracket_leaf.get_parent_until().path
 if (module_path is None):
  (yield None)
 else:
  (yield (module_path, before_bracket, bracket_leaf.start_pos))
 (yield evaluate_goto_definition(evaluator, bracket_leaf.get_previous_leaf()))

@ time_cache ( 'call_signatures_validity' ) def cache_call_signatures ( evaluator , bracket_leaf , code_lines , user_pos ) : index = ( user_pos [ 0 ] - 1 ) before_cursor = code_lines [ index ] [ : user_pos [ 1 ] ] other_lines = code_lines [ bracket_leaf . start_pos [ 0 ] : index ] whole = '\n' . join ( ( other_lines + [ before_cursor ] ) ) before_bracket = re . match ( '.*\\(' , whole , re . DOTALL ) module_path = bracket_leaf . get_parent_until ( ) . path if ( module_path is None ) : ( yield None ) else : ( yield ( module_path , before_bracket , bracket_leaf . start_pos ) ) ( yield evaluate_goto_definition ( evaluator , bracket_leaf . get_previous_leaf ( ) ) )
this function calculates the cache key .