code: def add_methods(self, names, methods):
          
          if isinstance(names, string_types):
              names = [names]
              methods = [methods]
          for name,method in zip(names, methods):
              setattr(self, name, types.MethodType(method, self))
docs: Adds the given method(s) as instance method(s) of self. The
          method(s) must take `self` as a first argument.