class_docstr: A data structure to cache the sequence of functional calls.
  
  Each autoobject contains a callcache object. The call sequences will
  be gradually passed down to the last function call.
  Internally, it containes a callqueue which collects the function calls in    order and a tensors table which is used to collect the resulting    tensors from function execution.
class_docstr_tok: ["A","data","structure","to","cache","the","sequence","of","functional","calls",".","Each","autoobject","contains","a","callcache","object",".","The","call","sequences","will","be","gradually","passed","down","to","the","last","function","call",".","Internally",",","it","containes","a","callqueue","which","collects","the","function","calls","in","order","and","a","tensors","table","which","is","used","to","collect","the","resulting","tensors","from","function","execution","."]
docstr: Update the current autoobject's callcache from its input arguments.
  
  If the argument is also an autoobject, merge the callcache of
  the argument into current autoobject's callcache.
  
  :param arguments: input arguments of current layers
  :param current: the current autoobject
  :param ctype: the type of current call. Defaults to CALLTYPE.LAYER_CALL
docstr_tok: ["Update","the","current","autoobject","'s","callcache","from","its","input","arguments",".","If","the","argument","is","also","an","autoobject",",","merge","the","callcache","of","the","argument","into","current","autoobject","'s","callcache",".",":","param","arguments",":","input","arguments","of","current","layers",":","param","current",":","the","current","autoobject",":","param","ctype",":","the","type","of","current","call",".","Defaults","to","CALLTYPE.LAYER_CALL"]
code: def update(arguments, current, ctype=CALLTYPE.LAYER_CALL):
      """
      Update the current autoobject's callcache from its input arguments.
  
      If the argument is also an autoobject, merge the callcache of
      the argument into current autoobject's callcache.
  
      :param arguments: input arguments of current layers
      :param current: the current autoobject
      :param ctype: the type of current call. Defaults to CALLTYPE.LAYER_CALL
      """
  
      def _update_cache_from_input(cache, inp):
          """Loop over all arguments to find any autoobjects\
              in input and merge down the callcache."""
          if isinstance(inp, AutoObject):
              invalidInputError(
                  inp._callgraph is not None,
                  "inp._callgraph cannot be none",
              )
              input_callgraph = inp._callgraph
              # merge call graph from the input
              if not input_callgraph.skip:
                  cache.update_tensors(input_callgraph)
                  cache.update_calls(input_callgraph)
                  input_callgraph.skip = True
          elif isinstance(inp, list) or isinstance(inp, tuple):
              for item in inp:
                  _update_cache_from_input(cache, item)
          elif isinstance(inp, dict):
              for _, item in inp.items():
                  _update_cache_from_input(cache, item)
          else:
              # ignore other arguments
              pass
  
      cur_cache = CallCache.create()
  
      if ctype == CALLTYPE.LAYER_CALL or ctype == CALLTYPE.FUNC_CALL:
          _update_cache_from_input(cur_cache, arguments)
          cur_cache.append_call(current, arguments, ctype)
      elif ctype == CALLTYPE.FUNC_SLICE:
          (source, slice_args) = arguments
          _update_cache_from_input(cur_cache, source)
          cur_cache.append_call(current, arguments, CALLTYPE.FUNC_SLICE)
      else:
          invalidInputError(False, "Unexpected CallType: %s" % ctype)
  
      return cur_cache
  
file_path: BigDL/python/nano/src/bigdl/nano/automl/hpo/callgraph.py
imports: from .space import AutoObject
  from enum import Enum
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 9 for calling the CallCache obj's underlying member method code with example usage: obj.update(arguments, current, ctype) and returns: cur_cache