code: def email_error(algo_name, dt, e, environ=None):
      import requests
      import traceback
  
      if not mailgun:
          root = data_root(environ)
          filename = os.path.join(root, "mailgun.json")
          if not os.path.exists(filename):
              raise ValueError(
                  "mailgun.json not found in the catalyst data folder"
              )
  
          with open(filename) as data_file:
              mailgun.append(json.load(data_file))
  
      mg = mailgun[0]
  
      return requests.post(
          mg["url"],
          auth=("api", mg["api"]),
          data={
              "from": mg["from"],
              "to": mg["to"],
              "subject": "Error: {}".format(algo_name),
              "text": "{}\n\n{}\n{}".format(
                  dt, e, traceback.format_exc()
              ),
          },
      )
  
imports: import copy
  import csv
  import json
  import numbers
  import os
  import time
  import numpy
  import pandas
  from catalyst.assets._assets import TradingPair
  from catalyst.exchange.utils.exchange_utils import get_algo_folder
  from catalyst.utils.paths import data_root, ensure_directory
  from operator import itemgetter
label_desc: Use image node_id 11 for calling a global function with example usage: email_error(algo_name, dt, e, environ) and returns: requests