code: def expose_as(name, base, *methods):
      
      classdict = {}
      for method in methods:
          if not hasattr(base, method):
              raise AttributeError(
                  "Cannot expose '%s', because '%s' "
                  "instances lack this method" % (method, base.__name__)
              )
          else:
              classdict[method] = MethodSpectator(getattr(base, method), method)
      return type(name, (base, Watchable), classdict)
docs: Return a new type with certain methods that are exposed to callback registration.
  
      Parameters
      ----------
      name : str
          The name of the new type.
      base : type
          A type such as list or dict.
      *methods : str
          A str representation of the methods that should be exposed to callbacks.
  
      Returns
      -------
      exposed : obj:
          A :class:`Watchable` with methods that will notify a :class:`Spectator`.