code: def _find_weektime(datetime, time_type='min'):
      
  
      if time_type == 'sec':
          return datetime.weekday() * 24 * 60 * 60 + datetime.hour * 60 * 60 + datetime.minute * 60 + datetime.second
      elif time_type == 'min':
          return datetime.weekday() * 24 * 60 + datetime.hour * 60 + datetime.minute
      else:
          raise ValueError("Invalid time type specified.")
docs: Finds the minutes/seconds aways from midnight between Sunday and Monday.
  
      Parameters
      ----------
      datetime : datetime
          The date and time that needs to be converted.
      time_type : 'min' or 'sec'
          States whether the time difference should be specified in seconds or minutes.