class_docstr: Mixin class for flag and configuration settings management.
docstr: Get flag value from estimator class and dynamic flag overrides.
  
  Parameters
  ----------
  flag_name : str
      Name of flag to be retrieved
  flag_value_default : any type, optional; default=None
      Default/fallback value if flag is not found
  raise_error : bool
      whether a ValueError is raised when the flag is not found
  flag_attr_name : str, optional, default = "_flags"
      name of the flag attribute that is read
  
  Returns
  -------
  flag_value :
      Value of the `flag_name` flag in self. If not found, returns an error if
      raise_error is True, otherwise it returns `flag_value_default`.
  
  Raises
  ------
  ValueError if raise_error is True i.e. if flag_name is not in self.get_flags(
  ).keys()
code: def _get_flag(
      self,
      flag_name,
      flag_value_default=None,
      raise_error=True,
      flag_attr_name="_flags",
  ):
      """Get flag value from estimator class and dynamic flag overrides.
  
      Parameters
      ----------
      flag_name : str
          Name of flag to be retrieved
      flag_value_default : any type, optional; default=None
          Default/fallback value if flag is not found
      raise_error : bool
          whether a ValueError is raised when the flag is not found
      flag_attr_name : str, optional, default = "_flags"
          name of the flag attribute that is read
  
      Returns
      -------
      flag_value :
          Value of the `flag_name` flag in self. If not found, returns an error if
          raise_error is True, otherwise it returns `flag_value_default`.
  
      Raises
      ------
      ValueError if raise_error is True i.e. if flag_name is not in self.get_flags(
      ).keys()
      """
      collected_flags = self._get_flags(flag_attr_name=flag_attr_name)
  
      flag_value = collected_flags.get(flag_name, flag_value_default)
  
      if raise_error and flag_name not in collected_flags.keys():
          raise ValueError(
              f"Tag with name {flag_name} could not be found."
          )
  
      return flag_value
  
file_path: sktime/sktime/base/_tagmanager.py
imports: import inspect
  from copy import deepcopy
label_desc: Use image node_id 5 for calling the _FlagManager obj's underlying member method code with example usage: obj._get_flag(flag_name, flag_value_default, raise_error, flag_attr_name) and returns: flag_value