class_docstr: :class:`JAMLCompatible` is a mixin class designed to be used with multiple inheritance.
  
  It will add :meth:`to_yaml` and :meth:`from_yaml` to the target class,
  making that class JAML-friendly.
  
  .. warning::
      For the sake of cooperative multiple inheritance, do NOT implement :meth:`__init__` for this class
docstr: A low-level interface required by :mod:`pyyaml` write interface.
  
  .. warning::
      This function should not be used directly, please use :meth:`save_config`.
  
  :param representer: the class that will serialize
  :param data: the data to serialize
  :return: the node's representation
docstr_tok: ["A","low-level","interface","required","by",":","mod",":","`","pyyaml","`","write","interface",".","..","warning",":",":","This","function","should","not","be","used","directly",",","please","use",":","meth",":","`","save_config","`",".",":","param","representer",":","the","class","that","will","serialize",":","param","data",":","the","data","to","serialize",":","return",":","the","node","'s","representation"]
code: def _to_yaml(cls, representer, data):
      """
      A low-level interface required by :mod:`pyyaml` write interface.
  
      .. warning::
          This function should not be used directly, please use :meth:`save_config`.
  
      :param representer: the class that will serialize
      :param data: the data to serialize
      :return: the node's representation
      """
      from jina.jaml.parsers import get_parser
  
      config_dict = get_parser(cls, version=data._version).dump(data)
      config_dict_with_jtype = {
          "jtype": cls.__name__
      }  # specifies the type of Jina object that is represented
      config_dict_with_jtype.update(config_dict)
      # To maintain compatibility with off-the-shelf parsers we don't want any tags ('!...') to show up in the output
      # Since pyyaml insists on receiving a tag, we need to pass the default map tag. This won't show up in the output
      return representer.represent_mapping(
          representer.DEFAULT_MAPPING_TAG, config_dict_with_jtype
      )
  
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 1 for calling the JAMLCompatible obj's underlying member method code with example usage: obj._to_yaml(cls, representer, data) and returns: representer