docstr: This function is used to access global environment variables.
  
  Example
  -------
  >>> X_train = get_config('X_train')
  
  This will return training features.
  
  
  variable : str, default = None
      Name of the variable to return the value of. If None,
      will return a list of possible names.
  
  
  Returns
  -------
  variable
docstr_tok: ["This","function","is","used","to","access","global","environment","variables",".","Example","--","--","--","-",">",">",">","X_train","=","get_config","(","'X_train","'",")","This","will","return","training","features",".","variable",":","str",",","default","=","None","Name","of","the","variable","to","return","the","value","of",".","If","None",",","will","return","a","list","of","possible","names",".","Returns","--","--","--","-","variable"]
code: def get_config(self, variable: Optional[str] = None) -> Any:
      """
      This function is used to access global environment variables.
  
      Example
      -------
      >>> X_train = get_config('X_train')
  
      This will return training features.
  
  
      variable : str, default = None
          Name of the variable to return the value of. If None,
          will return a list of possible names.
  
  
      Returns
      -------
      variable
  
      """
      function_params_str = ", ".join(
          [
              f"{k}={v}"
              for k, v in locals().items()
              if not k == "globals_d"
          ]
      )
  
      self.logger.info("Initializing get_config()")
      self.logger.info(f"get_config({function_params_str})")
  
      variable_and_property_keys = self.variable_and_property_keys
  
      if not variable:
          return variable_and_property_keys
  
      if variable not in variable_and_property_keys:
          raise ValueError(
              f"Variable '{variable}' not found. Possible variables are: {list(variable_and_property_keys)}"
          )
  
      if any(
          variable.endswith(attr)
          for attr in ("train", "test", "dataset")
      ):
          msg = (
              f"Variable: '{variable}' used to return the transformed values in PyCaret 2.x. "
              "From PyCaret 3.x, this will return the raw values. "
              f"If you need the transformed values, call get_config with '{variable}_transformed' instead."
          )
          self.logger.info(msg)
          warnings.warn(msg)  # print on screen
  
      var = getattr(self, variable)
  
      self.logger.info(f"Variable: {variable[:-12]} returned as {var}")
      self.logger.info(
          "get_config() successfully completed......................................"
      )
  
      return var
  
imports: import inspect
  import os
  import warnings
  from collections import defaultdict
  from typing import Any, BinaryIO, Callable, Dict, Optional, Union
  import cloudpickle
  import pandas
  import pycaret.internal.patches.sklearn
  import pycaret.internal.patches.yellowbrick
  import pycaret.internal.persistence
  from pycaret.internal.logging import get_logger
  from pycaret.utils.constants import DATAFRAME_LIKE
  from pycaret.utils.generic import LazyExperimentMapping
label_desc: Use image node_id 17 for calling the _PyCaretExperiment obj's underlying member method code with example usage: obj.get_config(variable) and returns: var, variable_and_property_keys