code: def function_trace(function_name):
      
      if newrelic:
          nr_transaction = newrelic.agent.current_transaction()
          with newrelic.agent.FunctionTrace(nr_transaction, function_name):
              yield
      else:
          yield
docs: Wraps a chunk of code that we want to appear as a separate, explicit,
      segment in our monitoring tools.