parameters: (parent_ids_dict,
                      var_ids_dict,
                      modified_ids_dict=None,
                      ctx=gast.Load)
return_statement: return arguments
docstring: Find out the ast.Name.id list of input by analyzing node's AST information.
docstring_summary: Find out the ast.Name.id list of input by analyzing node's AST information.
docstring_tokens: Find out the ast . Name . id list of input by analyzing node s AST information .
function: def parse_cond_args(parent_ids_dict,
                      var_ids_dict,
                      modified_ids_dict=None,
                      ctx=gast.Load):
      """
      Find out the ast.Name.id list of input by analyzing node's AST information.
      """
  
      # 1. filter the var fit the ctx
      arg_name_ids = [
          var_id for var_id, var_ctx in six.iteritems(var_ids_dict)
          if isinstance(var_ctx[0], ctx)
      ]
  
      # 2. args should contain modified var ids in if-body or else-body
      #  case:
      #
      #   ```
      #   if b < 1:
      #     z = y
      #   else:
      #     z = x
      #   ```
      #
      #   In the above case, `z` should be in the args of cond()
      if modified_ids_dict:
          arg_name_ids = set(arg_name_ids) | set(modified_ids_dict)
  
      # 3. args should not contain the vars not in parent ids
      #  case :
      #
      #   ```
      #   x = 1
      #   if x > y:
      #     z = [v for v in range(i)]
      #   ```
      #
      #   In the above case, `v` should not be in the args of cond()
      arg_name_ids = list(set(arg_name_ids) & set(parent_ids_dict))
  
      arg_name_ids.sort()
      args = [
          gast.Name(
              id=name_id, ctx=gast.Load(), annotation=None, type_comment=None)
          for name_id in arg_name_ids
      ]
      arguments = gast.arguments(
          args=args,
          posonlyargs=[],
          vararg=None,
          kwonlyargs=[],
          kw_defaults=None,
          kwarg=None,
          defaults=[])
  
      return arguments
function_tokens: def parse_cond_args ( parent_ids_dict , var_ids_dict , modified_ids_dict = None , ctx = gast . Load ) : # 1. filter the var fit the ctx arg_name_ids = [ var_id for var_id , var_ctx in six . iteritems ( var_ids_dict ) if isinstance ( var_ctx [ 0 ] , ctx ) ] # 2. args should contain modified var ids in if-body or else-body #  case: # #   ``` #   if b < 1: #     z = y #   else: #     z = x #   ``` # #   In the above case, `z` should be in the args of cond() if modified_ids_dict : arg_name_ids = set ( arg_name_ids ) | set ( modified_ids_dict ) # 3. args should not contain the vars not in parent ids #  case : # #   ``` #   x = 1 #   if x > y: #     z = [v for v in range(i)] #   ``` # #   In the above case, `v` should not be in the args of cond() arg_name_ids = list ( set ( arg_name_ids ) & set ( parent_ids_dict ) ) arg_name_ids . sort ( ) args = [ gast . Name ( id = name_id , ctx = gast . Load ( ) , annotation = None , type_comment = None ) for name_id in arg_name_ids ] arguments = gast . arguments ( args = args , posonlyargs = [ ] , vararg = None , kwonlyargs = [ ] , kw_defaults = None , kwarg = None , defaults = [ ] ) return arguments