code: def get_delta(value):
      
      if isinstance(value, (int, float)):
          return timedelta(seconds=value)
      elif isinstance(value, timedelta):
          return value
      raise Exception('Invalid delta')
docs: Return a timedelta object based on the value which can be a timedelta
      or a number of seconds (int or float).
      Raise an exception in all other cases.