input: Write a python function to time the execution of another function using the timed decorator.
  assert timed(sum)([1, 2, 3, 4, 5]) == (15, timed(sum)([1, 2, 3, 4, 5])[1])
  assert timed(sorted)([5, 2, 3, 1, 4]) == ([1, 2, 3, 4, 5], timed(sorted)([5, 2, 3, 1, 4])[1])
  assert timed(lambda x: x**2)(3) == (9, timed(lambda x: x**2)(3)[1])
output: import time
  
  def timed(func):
      def wrapper(*args, **kwargs):
          start_time = time.time()
          result = func(*args, **kwargs)
          end_time = time.time()
          elapsed_time = end_time - start_time
          return result, elapsed_time
      return wrapper