Context manager for profiling API calls.
This is a method of the Profiler class in the profiler module.
def api_call(endpoint: str, method: str) -> Any