code: def getattr_with_deprecated_properties(obj, item, deprecated_properties):
      
      if item in deprecated_properties:
          deprecation_message = generate_property_deprecation_message(
              to_be_removed_in_version=deprecated_properties[item]['to_be_removed_in_version'],
              old_name=item,
              new_name=deprecated_properties[item].get('new_property', item),
              new_attribute=deprecated_properties[item]['client_property'],
          )
          warnings.simplefilter('always', DeprecationWarning)
          warnings.warn(
              message=deprecation_message,
              category=DeprecationWarning,
              stacklevel=2,
          )
          warnings.simplefilter('default', DeprecationWarning)
          client_property = getattr(obj, deprecated_properties[item]['client_property'])
          return getattr(client_property, deprecated_properties[item].get('new_property', item))
  
      raise AttributeError("'{class_name}' has no attribute '{item}'".format(
          class_name=obj.__class__.__name__,
          item=item,
      ))
docs: Helper method to use in the getattr method of a class with deprecated properties.
  
      :param obj: Instance of the Class containing the deprecated properties in question.
      :type obj: object
      :param item: Name of the attribute being requested.
      :type item: str
      :param deprecated_properties: List of deprecated properties. Each item in the list is a dict with at least a
          "to_be_removed_in_version" and "client_property" key to be used in the displayed deprecation warning.
      :type deprecated_properties: List[dict]
      :return: The new property indicated where available.
      :rtype: object