class_docstr: Counterfactual Reinforcement Learning. 
class_docstr_tok: ["Counterfactual","Reinforcement","Learning","."]
docstr: Constructs a name for the given object. If the object has as built-in name, the name is return.
  If the object has a built-in class name, the name of the class is returned. Otherwise ``'unknown'`` is returned.
  
  Parameters
  ----------
  a
      Object to give the name for.
  
  Returns
  -------
  Name of the object.
code: def _get_name(a: Any) -> str:
      """
      Constructs a name for the given object. If the object has as built-in name, the name is return.
      If the object has a built-in class name, the name of the class is returned. Otherwise ``'unknown'`` is returned.
  
      Parameters
      ----------
      a
          Object to give the name for.
  
      Returns
      -------
      Name of the object.
      """
      if hasattr(a, "__name__"):
          return a.__name__
  
      if hasattr(a, "__class__"):
          return str(a.__class__)
  
      return "unknown"
  
imports: import logging
  import os
  from abc import ABC, abstractmethod
  from copy import deepcopy
  from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Tuple, Union, cast
  import numpy
  from tqdm import tqdm
  from alibi.api.defaults import DEFAULT_DATA_CFRL, DEFAULT_META_CFRL
  from alibi.api.interfaces import Explainer, Explanation, FitMixin
  from alibi.explainers.backends.cfrl_base import generate_empty_condition, get_classification_reward, get_hard_distribution, identity_function
  from alibi.utils.frameworks import Framework, has_pytorch, has_tensorflow
label_desc: Use image node_id 3 for calling the CounterfactualRL obj's underlying member method code with example usage: obj._get_name(a) and returns: str, a, str