docs: def datetime(past=True, random=random):
      """
      Returns a random datetime from the past... or the future!
  
      >>> mock_random.seed(0)
      >>> datetime(random=mock_random).isoformat()
      '1950-02-03T03:04:05'
  
      """
  
      def year():
          if past:
              return random.choice(range(1950,2005))
          else:
              return _datetime.datetime.now().year + random.choice(range(1, 50))
  
      def month():
          return random.choice(range(1,12))
  
      def day():
          return random.choice(range(1,31))
  
      def hour():
          return random.choice(range(0,23))
  
      def minute():
          return random.choice(range(0,59))
  
      def second():
          return random.choice(range(0,59))
  
      try:
          return _datetime.datetime(year=year(),
                                    month=month(),
                                    day=day(),
                                    hour=hour(),
                                    minute=minute(),
                                    second=second())
      except ValueError:
          return datetime(past=past)