class_docstr: A class for objects that put themselves in a `Context` using
  the `with` statement.
  
  The implementation for this class is heavily borrowed from the pymc3
  library and adapted with the design goals of TensorTrade in mind.
  
  Parameters
  ----------
  config : dict
      The configuration holding the information for each `Component`.
  
  Methods
  -------
  from_json(path)
      Creates a `TradingContext` from a json file.
  from_yaml(path)
      Creates a `TradingContext` from a yaml file.
  
  Warnings
  --------
  If there is a conflict in the contexts of different components because
  they were initialized under different contexts, can have undesirable effects.
  Therefore, a warning should be made to the user indicating that using
  components together that have conflicting contexts can lead to unwanted
  behavior.
  
  References
  ----------
  [1] https://github.com/pymc-devs/pymc3/blob/master/pymc3/model.py
class_docstr_tok: ["A","class","for","objects","that","put","themselves","in","a","`","Context","`","using","the","`","with","`","statement",".","The","implementation","for","this","class","is","heavily","borrowed","from","the","pymc3","library","and","adapted","with","the","design","goals","of","TensorTrade","in","mind",".","Parameters","--","--","--","--","--","config",":","dict","The","configuration","holding","the","information","for","each","`","Component","`",".","Methods","--","--","--","-","from_json","(","path",")","Creates","a","`","TradingContext","`","from","a","json","file",".","from_yaml","(","path",")","Creates","a","`","TradingContext","`","from","a","yaml","file",".","Warnings","--","--","--","--","If","there","is","a","conflict","in","the","contexts","of","different","components","because","they","were","initialized","under","different","contexts",",","can","have","undesirable","effects",".","Therefore",",","a","warning","should","be","made","to","the","user","indicating","that","using","components","together","that","have","conflicting","contexts","can","lead","to","unwanted","behavior",".","References","--","--","--","--","--","[","1","]","https",":","\/\/github.com\/pymc-devs\/pymc3\/blob\/master\/pymc3\/model.py"]
docstr: Gets the first context on the stack.
  
  Returns
  -------
  `TradingContext`
      The first context on the stack.
docstr_tok: ["Gets","the","first","context","on","the","stack",".","Returns","--","--","--","-","`","TradingContext","`","The","first","context","on","the","stack","."]
code: def get_context(cls) -> "TradingContext":
      """Gets the first context on the stack.
  
      Returns
      -------
      `TradingContext`
          The first context on the stack.
      """
      return cls.get_contexts()[-1]
  
imports: import threading
  import json
  import yaml
  from collections import UserDict
  from typing import List
  import numpy
  from .None import registry
label_desc: Use image node_id 6 for calling the TradingContext obj's underlying member method code with example usage: obj.get_context(cls) and returns: cls