<human>:  how to check the time taken for a function.
<bot>: Here is a Python function to check the time taken for a task

import time

def time_taken(func):
  """
  Returns the time taken for a function

  :param func:
  :return:
  """
  start = time.time()
  func()
  end = time.time()
  return end - start

# Enter the function
func = lambda: 1

# Calling the function
print((time_taken(func)))

#Example Output
# 7.152557373046875e-07

#Remember to inspect code for bugs.