code: def evolve(*args, **changes):
      """
      Create a new instance, based on the first positional argument with
      *changes* applied.
  
      :param inst: Instance of a class with *attrs* attributes.
      :param changes: Keyword changes in the new copy.
  
      :return: A copy of inst with *changes* incorporated.
  
      :raise TypeError: If *attr_name* couldn't be found in the class
          ``__init__``.
      :raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*
          class.
  
      .. versionadded:: 17.1.0
      .. deprecated:: 23.1.0
         It is now deprecated to pass the instance using the keyword argument
         *inst*. It will raise a warning until at least April 2024, after which
         it will become an error. Always pass the instance as a positional
         argument.
      """
      # Try to get instance by positional argument first.
      # Use changes otherwise and warn it'll break.
      if args:
          try:
              (inst,) = args
          except ValueError:
              msg = f"evolve() takes 1 positional argument, but {len(args)} were given"
              raise TypeError(msg) from None
      else:
          try:
              inst = changes.pop("inst")
          except KeyError:
              msg = "evolve() missing 1 required positional argument: 'inst'"
              raise TypeError(msg) from None
  
          import warnings
  
          warnings.warn(
              "Passing the instance per keyword argument is deprecated and "
              "will stop working in, or after, April 2024.",
              DeprecationWarning,
              stacklevel=2,
          )
  
      cls = inst.__class__
      attrs = fields(cls)
      for a in attrs:
          if not a.init:
              continue
          attr_name = a.name  # To deal with private attributes.
          init_name = a.alias
          if init_name not in changes:
              changes[init_name] = getattr(inst, attr_name)
  
      return cls(**changes)
  
file_path: catboost/contrib/python/attrs/py3/attr/_funcs.py
imports: import copy
  from ._compat import PY_3_9_PLUS, get_generic_base
  from ._make import NOTHING, _obj_setattr, fields
  from .exceptions import AttrsAttributeNotFoundError
label_desc: Use image node_id 6 for calling a global function with example usage: evolve() and returns: cls