docstr: We override __new__ to saving serializable constructor arguments.
  
  These arguments are used to auto-generate an object serialization
  config, which enables user-created subclasses to be serializable
  out of the box in most cases without forcing the user
  to manually implement `get_config()`.
docstr_tok: ["We","override","__new__","to","saving","serializable","constructor","arguments",".","These","arguments","are","used","to","auto-generate","an","object","serialization","config",",","which","enables","user-created","subclasses","to","be","serializable","out","of","the","box","in","most","cases","without","forcing","the","user","to","manually","implement","`","get_config","(",")","`","."]
code: def __new__(cls, *args, **kwargs):
      """We override __new__ to saving serializable constructor arguments.
  
      These arguments are used to auto-generate an object serialization
      config, which enables user-created subclasses to be serializable
      out of the box in most cases without forcing the user
      to manually implement `get_config()`.
      """
      # Generate a config to be returned by default by `get_config()`.
      arg_names = inspect.getfullargspec(cls.__init__).args
      kwargs.update(dict(zip(arg_names[1 : len(args) + 1], args)))
      instance = super(Operation, cls).__new__(cls)
      # For safety, we only rely on auto-configs for a small set of
      # serializable types.
      supported_types = (str, int, float, bool, type(None))
      try:
          flat_arg_values = tree.flatten(kwargs)
          auto_config = True
          for value in flat_arg_values:
              if not isinstance(value, supported_types):
                  auto_config = False
                  break
      except TypeError:
          auto_config = False
      try:
          instance._lock = False
          if auto_config:
              from keras.saving import serialization_lib
  
              instance._auto_config = (
                  serialization_lib.SerializableDict(**kwargs)
              )
          else:
              instance._auto_config = None
          instance._lock = True
      except RecursionError:
          # Setting an instance attribute in __new__ has the potential
          # to trigger an infinite recursion if a subclass overrides
          # setattr in an unsafe way.
          pass
      return instance
  
imports: import inspect
  import textwrap
  import tree
  from keras import backend
  from keras.api_export import keras_export
  from keras.backend.common.keras_tensor import any_symbolic_tensors
  from keras.ops.node import Node
  from keras.utils import python_utils
  from keras.utils import traceback_utils
  from keras.utils.naming import auto_name
label_desc: Use image node_id 6 for calling the Operation obj's underlying member method code with example usage: obj.__new__(cls) and returns: instance