class_docstr: Replace list nodes by tuple nodes when possible
  
  >>> import gast as ast
  >>> from pythran import passmanager, backend
  >>> node = ast.parse("def foo(n): import numpy; return numpy.ones([n,n])")
  >>> pm = passmanager.PassManager("test")
  >>> _, node = pm.apply(ListToTuple, node)
  >>> print(pm.dump(backend.Python, node))
  def foo(n):
      import numpy
      return numpy.ones((n, n))
class_docstr_tok: ["Replace","list","nodes","by","tuple","nodes","when","possible",">",">",">","import","gast","as","ast",">",">",">","from","pythran","import","passmanager",",","backend",">",">",">","node","=","ast.parse","(","``","def","foo","(","n",")",":","import","numpy",";","return","numpy.ones","(","[","n",",","n","]",")","''",")",">",">",">","pm","=","passmanager.PassManager","(","``","test","''",")",">",">",">","_",",","node","=","pm.apply","(","ListToTuple",",","node",")",">",">",">","print","(","pm.dump","(","backend.Python",",","node",")",")","def","foo","(","n",")",":","import","numpy","return","numpy.ones","(","(","n",",","n",")",")"]
code: def convert(self, node):
      self.update = True
  
      if isinstance(node, ast.Call):
          if not node.args:
              node = ast.Tuple([])
          else:
              node = node.args[0]
      elif isinstance(node, ast.List):
          node = ast.Tuple(node.elts, ast.Load())
  
      return ast.Call(
          path_to_attr(("builtins", "pythran", "static_list")),
          [node],
          [],
      )
  
file_path: pythran/pythran/optimizations/list_to_tuple.py
imports: from pythran.analyses import Aliases, FixedSizeList
  from pythran.tables import MODULES
  from pythran.passmanager import Transformation
  from pythran.utils import path_to_attr
  import gast
label_desc: Use image node_id 6 for calling the ListToTuple obj's underlying member method code with example usage: obj.convert(node) and returns: ast