code: def now(tz=None):  # type: (Union[str, _Timezone, None]) -> DateTime
      
      if has_test_now():
          test_instance = get_test_now()
          _tz = _safe_timezone(tz)
  
          if tz is not None and _tz != test_instance.timezone:
              test_instance = test_instance.in_tz(_tz)
  
          return test_instance
  
      if tz is None or tz == "local":
          dt = _datetime.datetime.now(local_timezone())
      elif tz is UTC or tz == "UTC":
          dt = _datetime.datetime.now(UTC)
      else:
          dt = _datetime.datetime.now(UTC)
          tz = _safe_timezone(tz)
          dt = tz.convert(dt)
  
      return instance(dt, tz)
docs: Get a DateTime instance for the current date and time.