class_docstr: euclidean GP factory 
class_docstr_tok: ["euclidean","GP","factory"]
docstr: Gets a string format of the kernel depending on whether it is SE/Poly.
code: def _get_kernel_str(cls, kern):
      """Gets a string format of the kernel depending on whether it is SE/Poly."""
      if isinstance(kern, gp_kernel.AdditiveKernel):
          return str(kern)
      if isinstance(kern, gp_kernel.SEKernel) or isinstance(
          kern, gp_kernel.MaternKernel
      ):
          hp_name = "dim_bandwidths"
          kern_name = (
              "se"
              if isinstance(kern, gp_kernel.SEKernel)
              else "matern(%0.1f)" % (kern.hyperparams["nu"])
          )
      elif isinstance(kern, gp_kernel.PolyKernel):
          hp_name = "dim_scalings"
          kern_name = "poly"
      else:  # Return an empty string.
          return ""
      if kern.dim > 6:
          ret = "%0.4f(avg)" % (kern.hyperparams[hp_name].mean())
      else:
          ret = get_list_of_floats_as_str(kern.hyperparams[hp_name])
      ret = kern_name + "-" + ret
      return ret
  
imports: from __future__ import division
  from argparse import Namespace
  import numpy
  from .None import gp_core, mf_gp
  from .None import kernel
  from ..utils.ancillary_utils import get_list_of_floats_as_str
  from ..utils.general_utils import get_sublist_from_indices, map_to_bounds
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.oper_utils import random_sample_from_discrete_domain
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 4 for calling the EuclideanGP obj's underlying member method code with example usage: obj._get_kernel_str(cls, kern) and returns: ret, str, str