text: from cli.helpers.ObjDict import ObjDict
  from copy import deepcopy
  
  
  def nested_dict_to_objdict(d):
      for k, v in d.items():
          if isinstance(v, dict):
              nested_dict_to_objdict(v)
              d[k] = ObjDict(v)
  
  
  def dict_to_objdict(d):
      dc = deepcopy(d)
      nested_dict_to_objdict(dc)
      return ObjDict(dc)
  
  
  def nested_objdict_to_dict(d):
      for k, v in d.items():
          if isinstance(v, ObjDict):
              nested_objdict_to_dict(v)
              d[k] = dict(v)
  
  
  def objdict_to_dict(d):
      dc = deepcopy(d)
      nested_objdict_to_dict(dc)
      return dict(dc)
  
  
  def merge_objdict(to_merge, extend_by):
      for key, val in extend_by.items():
          if key in to_merge:
              if isinstance(to_merge[key], ObjDict):
                  merge_objdict(to_merge[key], val)
              else:
                  to_merge[key] = val
          else:
              to_merge[key] = val
  
  
  def remove_value(d, value):
      if isinstance(d, str):
          return
      elif isinstance(d, list):
          for dd in d:     
              remove_value(dd, value)
      else:
          for k in list(d):
              v = d[k]
              if isinstance(v, list) or isinstance(v, dict):
                  remove_value(v, value)
              else:
                  if value == v:
                      del d[k]
          
  