code: def contains(self, other):
          
          if not isinstance(other, Period):
              other = period(other)
          return self.start <= other.start and self.stop >= other.stop
docs: Returns ``True`` if the period contains ``other``. For instance, ``period(2015)`` contains ``period(2015-01)``