parameters: (module_context, trailer1, trailer2)
docstring: extract the path from either "sys.path.append" or "sys.path.insert"
docstring_summary: extract the path from either "sys.path.append" or "sys.path.insert"
docstring_tokens: extract the path from either sys . path . append or sys . path . insert
function: def _paths_from_list_modifications(module_context, trailer1, trailer2):
      """ extract the path from either "sys.path.append" or "sys.path.insert" """
      # Guarantee that both are trailers, the first one a name and the second one
      # a function execution with at least one param.
      if not (trailer1.type == 'trailer' and trailer1.children[0] == '.'
              and trailer2.type == '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):  # Possible trailing comma.
          arg = arg.children[2]
  
      for context in module_context.create_context(arg).eval_node(arg):
          if is_string(context):
              abs_path = _abs_path(module_context, context.get_safe_value())
              if abs_path is not None:
                  yield abs_path
function_tokens: def _paths_from_list_modifications ( module_context , trailer1 , trailer2 ) : # Guarantee that both are trailers, the first one a name and the second one # a function execution with at least one param. if not ( trailer1 . type == 'trailer' and trailer1 . children [ 0 ] == '.' and trailer2 . type == '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 ) : # Possible trailing comma. arg = arg . children [ 2 ] for context in module_context . create_context ( arg ) . eval_node ( arg ) : if is_string ( context ) : abs_path = _abs_path ( module_context , context . get_safe_value ( ) ) if abs_path is not None : yield abs_path