code: def get_class_with_attr_name(pyname):
      
      lineno = get_lineno_for_node(pyname.assignments[0].ast_node)
      holding_scope = pyname.module.get_scope().get_inner_scope_for_line(lineno)
      pyobject = holding_scope.pyobject
      if isinstance(pyobject, PyClass):
          pyclass = pyobject
      elif (isinstance(pyobject, PyFunction) and
            isinstance(pyobject.parent, PyClass)):
          pyclass = pyobject.parent
      else:
          return
      for name, attr in pyclass.get_attributes().items():
          if attr is pyname:
              return (pyclass, name)
docs: :type pyname: rope.base.pynamesdef.AssignedName
      :return: rope.base.pyobjectsdef.PyClass, str
      :rtype: tuple