code: def pop_momentum_by_name(self, name):
          
          momentum = self.get_momentum_by_name(name)
          self.remove_momentum(momentum)
          return momentum
docs: Removes and returns a momentum by the given name.
  
          :param name: the momentum name.
  
          :returns: a momentum removed.
  
          :raises TypeError: `name` is ``None``.
          :raises KeyError: failed to find a momentum named `name`.