code: def _set_listener(instance, obs):
      
      if obs.names is everything:
          names = list(instance._props)
      else:
          names = obs.names
      for name in names:
          if name not in instance._listeners:
              instance._listeners[name] = {typ: [] for typ in LISTENER_TYPES}
          instance._listeners[name][obs.mode] += [obs]
docs: Add listeners to a HasProperties instance