code: def _format_grain_name(grain: GrainType) -> str:
      """
      Convert grain name to string.
  
      :param grain: the grain name.
      :return: the string representation of the given grain.
      """
      if not isinstance(grain, tuple) and not isinstance(grain, list):
          return str(grain)
      grain = list(map(str, grain))
      return "|".join(grain)
  
file_path: MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/forecasting-backtest-single-model/assets/score.py
imports: from typing import Any, Dict, Optional, List
  import argparse
  import json
  import os
  import re
  import numpy
  import pandas
  from matplotlib import pyplot
  from matplotlib.backends.backend_pdf import PdfPages
  from azureml.automl.core.shared import constants
  from azureml.automl.core.shared.types import GrainType
  from azureml.automl.runtime.shared.score import scoring
label_desc: Use image node_id 2 for calling a global function with example usage: _format_grain_name(grain) and returns: str, str