class_docstr: A callable wrapper for a function in the static schedule.
  
  Args:
      func (FunctionNode): A function in the static schedule.
      args: Arguments to 'func'.
      kwargs: Keyword arguments to 'func'.
      inputs_hooks (list of tuples): A list of hooks that instruct how to
          update the ndarray references in 'args' so that they
          refer to the correct master array in 'unique_arrays'.
      return_hooks (list of tuples): A list of hooks that instruct how
          to update the ndarray references in 'unique_arrays' so that
          they refer to the correct arrays that were dynamically
          allocated and returned by 'func'. These run after
          'func' is called.
      unique_arrays (list of ndarray): The master list of all unique
          ndarrays that appear in the static schedule.
      func_name (str): An optional name of the static function. This is
          the name (if any) that was used as a decorater argument to
          `@static_code(func_name=name)`.
class_docstr_tok: ["A","callable","wrapper","for","a","function","in","the","static","schedule",".","Args",":","func","(","FunctionNode",")",":","A","function","in","the","static","schedule",".","args",":","Arguments","to","'func","'",".","kwargs",":","Keyword","arguments","to","'func","'",".","inputs_hooks","(","list","of","tuples",")",":","A","list","of","hooks","that","instruct","how","to","update","the","ndarray","references","in","'args","'","so","that","they","refer","to","the","correct","master","array","in","'unique_arrays","'",".","return_hooks","(","list","of","tuples",")",":","A","list","of","hooks","that","instruct","how","to","update","the","ndarray","references","in","'unique_arrays","'","so","that","they","refer","to","the","correct","arrays","that","were","dynamically","allocated","and","returned","by","'func","'",".","These","run","after","'func","'","is","called",".","unique_arrays","(","list","of","ndarray",")",":","The","master","list","of","all","unique","ndarrays","that","appear","in","the","static","schedule",".","func_name","(","str",")",":","An","optional","name","of","the","static","function",".","This","is","the","name","(","if","any",")","that","was","used","as","a","decorater","argument","to","`","@","static_code","(","func_name=name",")","`","."]
docstr: Run hooks to set correct references.
  
  This method is called from '__call__()'.
  Process the list of hooks which will modify the array references in
  the arguments list of the static function. This method must be
  called before executing the static function.
  
  The hooks specify that
  each array argument points to a "master" array reference in the
  unique_arrays list. If the reference in unique_arrays changes, then
  we must also change the corresponding array reference in the arguments
  list. The hooks specify the mapping and this method updates the
  references in args to the corresponding values from unique_arrays.
docstr_tok: ["Run","hooks","to","set","correct","references",".","This","method","is","called","from","'__call__","(",")","'",".","Process","the","list","of","hooks","which","will","modify","the","array","references","in","the","arguments","list","of","the","static","function",".","This","method","must","be","called","before","executing","the","static","function",".","The","hooks","specify","that","each","array","argument","points","to","a","``","master","''","array","reference","in","the","unique_arrays","list",".","If","the","reference","in","unique_arrays","changes",",","then","we","must","also","change","the","corresponding","array","reference","in","the","arguments","list",".","The","hooks","specify","the","mapping","and","this","method","updates","the","references","in","args","to","the","corresponding","values","from","unique_arrays","."]
code: def run_pre_hooks(self):
      """Run hooks to set correct references.
  
      This method is called from '__call__()'.
      Process the list of hooks which will modify the array references in
      the arguments list of the static function. This method must be
      called before executing the static function.
  
      The hooks specify that
      each array argument points to a "master" array reference in the
      unique_arrays list. If the reference in unique_arrays changes, then
      we must also change the corresponding array reference in the arguments
      list. The hooks specify the mapping and this method updates the
      references in args to the corresponding values from unique_arrays.
      """
      for hook in self.inputs_hooks:
          (ind, unique_ind) = hook
          self.in_list[ind] = self.unique_arrays[unique_ind]
  
      for hook in self.outputs_hooks:
          (ind, unique_ind) = hook
          self.out_list[ind] = self.unique_arrays[unique_ind]
  
      for ind in self.delete_hooks:
          self.unique_arrays[ind] = None
  
imports: import sys
  import weakref
  import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.function_node
label_desc: Use image node_id 2 for calling the ScheduleInfo obj's underlying member method code with example usage: obj.run_pre_hooks() without return types