code: def evolve(inst, **changes):
      """
      Create a new instance, based on *inst* 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 attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
          class.
  
      ..  versionadded:: 17.1.0
      """
      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 = (
              attr_name if attr_name[0] != "_" else attr_name[1:]
          )
          if init_name not in changes:
              changes[init_name] = getattr(inst, attr_name)
  
      return cls(**changes)
  
file_path: catboost/contrib/python/attrs/py2/attr/_funcs.py
imports: from __future__ import absolute_import, division, print_function
  import copy
  from ._compat import iteritems
  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(inst) and returns: cls