code: def _add_to_class(self, name, method):
          
          if hasattr(self._element_cls, name):
              return
          setattr(self._element_cls, name, method)
docs: Add *method* to the target class as *name*, unless *name* is already
          defined on the class.