code: def get_datetime(self, tz=None):
          
          dt = self.datetime
          assert dt.tzinfo == pytz.utc, "Algorithm should have a utc datetime"
          if tz is not None:
              dt = dt.astimezone(tz)
          return dt
docs: Returns the current simulation datetime.
  
          Parameters
          ----------
          tz : tzinfo or str, optional
              The timezone to return the datetime in. This defaults to utc.
  
          Returns
          -------
          dt : datetime
              The current simulation datetime converted to ``tz``.