def _paths_from_list_modifications(module_path, trailer1, trailer2):
 if (not (tree.is_node(trailer1, 'trailer') and (trailer1.children[0] == '.') and tree.is_node(trailer2, 'trailer') and (trailer2.children[0] == '(') and (len(trailer2.children) == 3))):
  return []
 name = trailer1.children[1].value
 if (name not in ['insert', 'append']):
  return []
 arg = trailer2.children[1]
 if ((name == 'insert') and (len(arg.children) in (3, 4))):
  arg = arg.children[2]
 return _execute_code(module_path, arg.get_code())

def _paths_from_list_modifications ( module_path , trailer1 , trailer2 ) : if ( not ( tree . is_node ( trailer1 , 'trailer' ) and ( trailer1 . children [ 0 ] == '.' ) and tree . is_node ( trailer2 , 'trailer' ) and ( trailer2 . children [ 0 ] == '(' ) and ( len ( trailer2 . children ) == 3 ) ) ) : return [ ] name = trailer1 . children [ 1 ] . value if ( name not in [ 'insert' , 'append' ] ) : return [ ] arg = trailer2 . children [ 1 ] if ( ( name == 'insert' ) and ( len ( arg . children ) in ( 3 , 4 ) ) ) : arg = arg . children [ 2 ] return _execute_code ( module_path , arg . get_code ( ) )
extract the path from either "sys .