class_docstr: A Jina YAML parser supports loading and dumping and substituting variables.
  
  To use it:
  
  .. highlight:: python
  .. code-block:: python
  
      from jina.jaml import JAML
  
      JAML.load(...)
      JAML.dump(...)
  
  
      class DummyClass:
          pass
  
  
      JAML.register(DummyClass)
  
  You can use expressions to programmatically set variables in YAML files and access contexts.
  An expression can be any combination of literal values, references to a context, or functions.
  You can combine literals, context references, and functions using operators.
  
  You need to use specific syntax to tell Jina to evaluate an expression rather than treat it as a string,
  which is based on GitHub actions syntax, and looks like this:
  
  .. highlight:: yaml
  .. code-block:: yaml
  
      ${{ <expression> }}
  
  This expression can be evaluated directly (i.e. substituted by the real value) when being loaded,
  by using :meth:`load(substitute=True)`
  
  JAML supports three different kinds of variables to be used as expressions: `Environment variables`
  (coming form the environment itself), `context variables` (being passed as a dict),
  and `internal references` (included in the .yaml file itself).
  
  An environment variable `var` is accessed through the following syntax:
  
  .. highlight:: yaml
  .. code-block:: yaml
  
      ${{ env.var }}
  
  Note the mandatory spaces before and after the variable denotation.
  
  Context variables can be accessed using the following syntax:
  
  .. highlight:: yaml
  .. code-block:: yaml
  
      ${{ context_var }}
  
  Or, if you want to be explicit:
  
  .. highlight:: yaml
  .. code-block:: yaml
  
      ${{ context.context_var }}
  
  These context variables are passed as a dict:
  
  .. highlight:: python
  .. code-block:: python
  
      obj = JAML.load(
          fp, substitute=True, context={'context_var': 3.14, 'context_var2': 'hello-world'}
      )
  
  Internal references point to other variables in the yaml file itself, and can be accessed using the following syntax:
  
  .. highlight:: yaml
  .. code-block:: yaml
  
      ${{root.path.to.var}}
  
  Note omission of spaces in this syntax.
  
  
  .. note::
      :class:`BaseFlow`, :class:`BaseExecutor`, :class:`BaseGateway`
      and all their subclasses have already implemented JAML interfaces,
      to load YAML config into objects, please use :meth:`Flow.load_config`,
      :meth:`BaseExecutor.load_config`, etc.
docstr: Fetch class from yaml tag
  
  :param tag: yaml tag
  :return: class object from tag
docstr_tok: ["Fetch","class","from","yaml","tag",":","param","tag",":","yaml","tag",":","return",":","class","object","from","tag"]
code: def cls_from_tag(tag: str) -> Optional["JAMLCompatible"]:
      """Fetch class from yaml tag
  
      :param tag: yaml tag
      :return: class object from tag
      """
      if not tag.startswith("!"):
          tag = "!" + tag
      bound = JinaLoader.yaml_constructors.get(tag, None)
      return bound.__self__ if bound else None
  
imports: import copy
  import os
  import re
  import string
  import tempfile
  import warnings
  from types import SimpleNamespace
  from typing import Any, Dict, List, Optional, Set, TextIO, Tuple, Union
  import yaml
  from yaml.constructor import FullConstructor
  from jina.jaml.helper import JinaLoader, JinaResolver, get_jina_loader_with_runtime, load_py_modules, parse_config_source
  from jina.excepts import BadConfigSource
label_desc: Use image node_id 6 for calling the JAML obj's underlying member method code with example usage: obj.cls_from_tag(tag) and returns: unknown