<human>:  keep track of how long a function has been running.
<bot>: Here is a Python function to keep track of how long a has been running

import time

def time_function(function):
  """Keep track of how long a function has been running."""
  import time
  start = time.time()
  function()
  end = time.time()
  print(("Time taken by function: " + str(end - start)))

# Enter the function

def function():
  print("This is a function")

# Calling the function
print((time_function(function)))

#Example Output
# This is a function
# Time taken by function: 3.337860107421875e-06
# None

#Remember to inspect code for bugs.