parameters: (self, node, function, pos_args)
docstring: Replace tuple([...]) by PyList_AsTuple or PySequence_Tuple.
docstring_summary: Replace tuple([...]) by PyList_AsTuple or PySequence_Tuple.
docstring_tokens: Replace tuple ( [ ... ] ) by PyList_AsTuple or PySequence_Tuple .
function: def _handle_simple_function_tuple(self, node, function, pos_args):
          """Replace tuple([...]) by PyList_AsTuple or PySequence_Tuple.
          """
          if len(pos_args) != 1 or not node.is_temp:
              return node
          arg = pos_args[0]
          if arg.type is Builtin.tuple_type and not arg.may_be_none():
              return arg
          if arg.type is Builtin.list_type:
              pos_args[0] = arg.as_none_safe_node(
                  "'NoneType' object is not iterable")
  
              return ExprNodes.PythonCapiCallNode(
                  node.pos, "PyList_AsTuple", self.PyList_AsTuple_func_type,
                  args=pos_args, is_temp=node.is_temp)
          else:
              return ExprNodes.AsTupleNode(node.pos, arg=arg, type=Builtin.tuple_type)
function_tokens: def _handle_simple_function_tuple ( self , node , function , pos_args ) : if len ( pos_args ) != 1 or not node . is_temp : return node arg = pos_args [ 0 ] if arg . type is Builtin . tuple_type and not arg . may_be_none ( ) : return arg if arg . type is Builtin . list_type : pos_args [ 0 ] = arg . as_none_safe_node ( "'NoneType' object is not iterable" ) return ExprNodes . PythonCapiCallNode ( node . pos , "PyList_AsTuple" , self . PyList_AsTuple_func_type , args = pos_args , is_temp = node . is_temp ) else : return ExprNodes . AsTupleNode ( node . pos , arg = arg , type = Builtin . tuple_type )