code: def assoc(inst, **changes):
      """
      Copy *inst* and apply *changes*.
  
      This is different from `evolve` that applies the changes to the arguments
      that create the new instance.
  
      `evolve`'s behavior is preferable, but there are `edge cases`_ where it
      doesn't work. Therefore `assoc` is deprecated, but will not be removed.
  
      .. _`edge cases`: https://github.com/python-attrs/attrs/issues/251
  
      :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 attrs.exceptions.AttrsAttributeNotFoundError: If *attr_name*
          couldn't be found on *cls*.
      :raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*
          class.
  
      ..  deprecated:: 17.1.0
          Use `attrs.evolve` instead if you can.
          This function will not be removed du to the slightly different approach
          compared to `attrs.evolve`.
      """
      new = copy.copy(inst)
      attrs = fields(inst.__class__)
      for k, v in changes.items():
          a = getattr(attrs, k, NOTHING)
          if a is NOTHING:
              msg = f"{k} is not an attrs attribute on {new.__class__}."
              raise AttrsAttributeNotFoundError(msg)
          _obj_setattr(new, k, v)
      return new
  
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 5 for calling a global function with example usage: assoc(inst) and returns: new