code: def copy(x):
      """Shallow copy operation on arbitrary Python objects.
  
      See the module's __doc__ string for more info.
      """
  
      cls = type(x)
  
      copier = _copy_dispatch.get(cls)
      if copier:
          return copier(x)
  
      if issubclass(cls, type):
          # treat it as a regular class:
          return _copy_immutable(x)
  
      copier = getattr(cls, "__copy__", None)
      if copier is not None:
          return copier(x)
  
      reductor = dispatch_table.get(cls)
      if reductor is not None:
          rv = reductor(x)
      else:
          reductor = getattr(x, "__reduce_ex__", None)
          if reductor is not None:
              rv = reductor(4)
          else:
              reductor = getattr(x, "__reduce__", None)
              if reductor:
                  rv = reductor()
              else:
                  raise Error(
                      "un(shallow)copyable object of type %s" % cls
                  )
  
      if isinstance(rv, str):
          return x
      return _reconstruct(x, None, *rv)
  
file_path: catboost/contrib/tools/python3/src/Lib/copy.py
imports: import types
  import weakref
  from copyreg import dispatch_table
label_desc: Use image node_id 1 for calling a global function with example usage: copy(x) and returns: _reconstruct, copier, _copy_immutable, copier, x