


import colorsys
import io

import cva
import matplotlib as mpl
import matplotlib.colors as mplc
import matplotlib.figure as mplfigure
import numpy as np
import torch
from matplotlib.backends.backend_agg import FigureCanvasAgg

from utils import img_tensorize


snake_case__     							= 1000



class     snake_case__  :
				def __init__(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase=1.2     ,      _UpperCAmelCase="g"     ,      _UpperCAmelCase=0.5     ,      _UpperCAmelCase="-"     ,      _UpperCAmelCase="test_out.jpg"     ,      _UpperCAmelCase=True     ,      _UpperCAmelCase=False     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=0.7     ,      ):




										"""simple docstring"""




										if isinstance(_UpperCAmelCase     ,      torch.Tensor      ):
																__magic_name__				:							Union[str, Any]				=      img.numpy().astype('np.uint8'      )
										if isinstance(_UpperCAmelCase     ,      _UpperCAmelCase      ):
																__magic_name__				:							Optional[int]				=      img_tensorize(_UpperCAmelCase      )
										assert isinstance(_UpperCAmelCase     ,      np.ndarray      )

										__magic_name__		, __magic_name__				:							List[Any]				=      img.shape[1], img.shape[0]
										__magic_name__				:							List[str]				=      mplfigure.Figure(frameon=_UpperCAmelCase      )
										__magic_name__				:							Any				=      fig.get_dpi()
										__magic_name__				:							Tuple				=      (width * scale + 1E-2) / dpi
										__magic_name__				:							Any				=      (height * scale + 1E-2) / dpi
										fig.set_size_inches(_UpperCAmelCase     ,      _UpperCAmelCase      )
										__magic_name__				:							int				=      fig.add_axes([0.0, 0.0, 1.0, 1.0]      )
										ax.axis('off'      )
										ax.set_xlim(0.0     ,      _UpperCAmelCase      )
										ax.set_ylim(_UpperCAmelCase      )

										__magic_name__				:							Dict				=      saveas
										__magic_name__				:							str				=      rgb
										__magic_name__				:							Dict				=      pynb
										__magic_name__				:							List[str]				=      img
										__magic_name__				:							Any				=      edgecolor
										__magic_name__				:							Any				=      0.5
										__magic_name__				:							Optional[Any]				=      linestyle
										__magic_name__				:							Dict				=      int(np.sqrt(min(_UpperCAmelCase     ,      _UpperCAmelCase      )      ) * scale // 3      )
										__magic_name__				:							Any				=      width
										__magic_name__				:							Tuple				=      height
										__magic_name__				:							List[str]				=      scale
										__magic_name__				:							Union[str, Any]				=      fig
										__magic_name__				:							Optional[Any]				=      ax
										__magic_name__				:							Optional[int]				=      pad
										__magic_name__				:							str				=      idaobj
										__magic_name__				:							List[str]				=      idaattr
										__magic_name__				:							Dict				=      FigureCanvasAgg(_UpperCAmelCase      )
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase=None      ):




										"""simple docstring"""




										if color is None:
																__magic_name__				:							Optional[int]				=      self.edgecolor
										((__magic_name__)		, (__magic_name__)		, (__magic_name__)		, (__magic_name__))				:							str				=      box
										__magic_name__				:							List[str]				=      xa - xa
										__magic_name__				:							Optional[Any]				=      ya - ya
										self.ax.add_patch(
										    mpl.patches.Rectangle(
										        (xa, ya)     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      fill=_UpperCAmelCase     ,      edgecolor=_UpperCAmelCase     ,      linewidth=self.font_size // 3     ,      alpha=self.alpha     ,      linestyle=self.linestyle     ,      )      )
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=None      ):




										"""simple docstring"""




										if len(boxes.shape      ) > 2:
																__magic_name__				:							Tuple				=      boxes[0]
										if len(obj_ids.shape      ) > 1:
																__magic_name__				:							List[Any]				=      obj_ids[0]
										if len(obj_scores.shape      ) > 1:
																__magic_name__				:							Optional[Any]				=      obj_scores[0]
										if len(attr_ids.shape      ) > 1:
																__magic_name__				:							Dict				=      attr_ids[0]
										if len(attr_scores.shape      ) > 1:
																__magic_name__				:							Tuple				=      attr_scores[0]
										if isinstance(_UpperCAmelCase     ,      torch.Tensor      ):
																__magic_name__				:							List[Any]				=      boxes.numpy()
										if isinstance(_UpperCAmelCase     ,      _UpperCAmelCase      ):
																__magic_name__				:							str				=      np.array(_UpperCAmelCase      )
										assert isinstance(_UpperCAmelCase     ,      np.ndarray      )
										__magic_name__				:							str				=      np.prod(boxes[:, 2:] - boxes[:, :2]     ,      axis=1      )
										__magic_name__				:							str				=      np.argsort(-areas      ).tolist()
										__magic_name__				:							Optional[Any]				=      boxes[sorted_idxs] if boxes is not None else None
										__magic_name__				:							List[Any]				=      obj_ids[sorted_idxs] if obj_ids is not None else None
										__magic_name__				:							Any				=      obj_scores[sorted_idxs] if obj_scores is not None else None
										__magic_name__				:							Union[str, Any]				=      attr_ids[sorted_idxs] if attr_ids is not None else None
										__magic_name__				:							Tuple				=      attr_scores[sorted_idxs] if attr_scores is not None else None

										__magic_name__				:							Optional[Any]				=      [self._random_color(maximum=1      ) for _ in range(len(_UpperCAmelCase      )      )]
										__magic_name__				:							Any				=      [assigned_colors[idx] for idx in sorted_idxs]
										if obj_ids is not None:
																__magic_name__				:							List[str]				=      self._create_text_labels_attr(_UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase      )
																for i in range(len(_UpperCAmelCase      )      ):
																						__magic_name__				:							List[Any]				=      assigned_colors[i]
																						self.add_box(boxes[i]     ,      _UpperCAmelCase      )
																						self.draw_labels(labels[i]     ,      boxes[i]     ,      _UpperCAmelCase      )
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase      ):




										"""simple docstring"""




										__magic_name__		, __magic_name__		, __magic_name__		, __magic_name__				:							List[str]				=      box
										__magic_name__				:							str				=      (xa, ya)
										__magic_name__				:							Dict				=      (ya - ya) * (xa - xa)
										__magic_name__				:							Optional[Any]				=      _SMALL_OBJ * self.scale
										if instance_area < small or ya - ya < 40 * self.scale:
																if ya >= self.height - 5:
																						__magic_name__				:							Tuple				=      (xa, ya)
																else:
																						__magic_name__				:							Dict				=      (xa, ya)

										__magic_name__				:							List[Any]				=      (ya - ya) / np.sqrt(self.height * self.width      )
										__magic_name__				:							Optional[int]				=      self._change_color_brightness(_UpperCAmelCase     ,      brightness_factor=0.7      )
										__magic_name__				:							Tuple				=      np.clip((height_ratio - 0.02) / 0.08 + 1     ,      1.2     ,      2      )
										font_size *= 0.75 * self.font_size

										self.draw_text(
										    text=_UpperCAmelCase     ,      position=_UpperCAmelCase     ,      color=_UpperCAmelCase     ,      )
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase="g"     ,      _UpperCAmelCase="left"     ,      ):




										"""simple docstring"""




										__magic_name__				:							Union[str, Any]				=      0
										__magic_name__				:							str				=      self.font_size
										__magic_name__				:							List[Any]				=      np.maximum(list(mplc.to_rgb(_UpperCAmelCase      )      )     ,      0.2      )
										__magic_name__				:							str				=      max(0.8     ,      np.max(_UpperCAmelCase      )      )
										__magic_name__				:							Optional[Any]				=      {
										    'facecolor': 'black',
										    'alpha': self.alpha,
										    'pad': self.pad,
										    'edgecolor': 'none',
										}
										__magic_name__		, __magic_name__				:							List[str]				=      position
										self.ax.text(
										    _UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      size=font_size * self.scale     ,      family='sans-serif'     ,      bbox=_UpperCAmelCase     ,      verticalalignment='top'     ,      horizontalalignment=_UpperCAmelCase     ,      color=_UpperCAmelCase     ,      zorder=10     ,      rotation=_UpperCAmelCase     ,      )
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase=None      ):




										"""simple docstring"""




										if saveas is None:
																__magic_name__				:							List[str]				=      self.saveas
										if saveas.lower().endswith('.jpg'      ) or saveas.lower().endswith('.png'      ):
																cva.imwrite(
																    _UpperCAmelCase     ,      self._get_buffer()[:, :, ::-1]     ,      )
										else:
																self.fig.savefig(_UpperCAmelCase      )
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase      ):




										"""simple docstring"""




										__magic_name__				:							Union[str, Any]				=      [self.idaobj[i] for i in classes]
										__magic_name__				:							Any				=      [self.idaattr[i] for i in attr_classes]
										__magic_name__				:							int				=      [
										    F"{label} {score:.2f} {attr} {attr_score:.2f}"
										    for label, score, attr, attr_score in zip(_UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase      )
										]
										return labels
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase      ):




										"""simple docstring"""




										__magic_name__				:							Dict				=      [self.idaobj[i] for i in classes]
										if scores is not None:
																if labels is None:
																						__magic_name__				:							int				=      ['{:.0f}%'.format(s * 100      ) for s in scores]
																else:
																						__magic_name__				:							Dict				=      ['{} {:.0f}%'.format(_UpperCAmelCase     ,      s * 100      ) for li, s in zip(_UpperCAmelCase     ,      _UpperCAmelCase      )]
										return labels
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase=255      ):




										"""simple docstring"""




										__magic_name__				:							Union[str, Any]				=      np.random.randint(0     ,      len(_COLORS      )      )
										__magic_name__				:							Union[str, Any]				=      _COLORS[idx] * maximum
										if not self.rgb:
																__magic_name__				:							Optional[int]				=      ret[::-1]
										return ret
				def  UpperCamelCase_						(  self      ):




										"""simple docstring"""




										if not self.pynb:
																__magic_name__		, __magic_name__				:							int				=      self.canvas.print_to_buffer()
																if (width, height) != (self.width, self.height):
																						__magic_name__				:							Optional[Any]				=      cva.resize(self.img     ,      (width, height)      )
																else:
																						__magic_name__				:							Optional[int]				=      self.img
										else:
																__magic_name__				:							str				=      io.BytesIO()  # works for cairo backend
																self.canvas.print_rgba(_UpperCAmelCase      )
																__magic_name__		, __magic_name__				:							Optional[int]				=      self.width, self.height
																__magic_name__				:							Dict				=      buf.getvalue()
																__magic_name__				:							Dict				=      self.img

										__magic_name__				:							str				=      np.frombuffer(_UpperCAmelCase     ,      dtype='uint8'      )
										__magic_name__				:							str				=      buffer.reshape(_UpperCAmelCase     ,      _UpperCAmelCase     ,      4      )
										__magic_name__		, __magic_name__				:							List[str]				=      np.split(_UpperCAmelCase     ,      [3]     ,      axis=2      )

										try:
																import numexpr as ne  # fuse them with numexpr

																__magic_name__				:							Union[str, Any]				=      ne.evaluate('img * (1 - alpha / 255.0) + rgb * (alpha / 255.0)'      )
										except ImportError:
																__magic_name__				:							Union[str, Any]				=      alpha.astype('float32'      ) / 255.0
																__magic_name__				:							List[str]				=      img * (1 - alpha) + rgb * alpha

										return visualized_image.astype('uint8'      )





				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase      ):




										"""simple docstring"""




										assert brightness_factor >= -1.0 and brightness_factor <= 1.0
										__magic_name__				:							str				=      mplc.to_rgb(_UpperCAmelCase      )
										__magic_name__				:							Union[str, Any]				=      colorsys.rgb_to_hls(*mplc.to_rgb(_UpperCAmelCase      )      )
										__magic_name__				:							Optional[Any]				=      polygon_color[1] + (brightness_factor * polygon_color[1])
										__magic_name__				:							Optional[Any]				=      0.0 if modified_lightness < 0.0 else modified_lightness
										__magic_name__				:							int				=      1.0 if modified_lightness > 1.0 else modified_lightness
										__magic_name__				:							Dict				=      colorsys.hls_to_rgb(polygon_color[0]     ,      _UpperCAmelCase     ,      polygon_color[2]      )
										return modified_color






snake_case__     							= (
    np.array(
        [
            0.000,
            0.447,
            0.741,
            0.850,
            0.325,
            0.098,
            0.929,
            0.694,
            0.125,
            0.494,
            0.184,
            0.556,
            0.466,
            0.674,
            0.188,
            0.301,
            0.745,
            0.933,
            0.635,
            0.078,
            0.184,
            0.300,
            0.300,
            0.300,
            0.600,
            0.600,
            0.600,
            1.000,
            0.000,
            0.000,
            1.000,
            0.500,
            0.000,
            0.749,
            0.749,
            0.000,
            0.000,
            1.000,
            0.000,
            0.000,
            0.000,
            1.000,
            0.667,
            0.000,
            1.000,
            0.333,
            0.333,
            0.000,
            0.333,
            0.667,
            0.000,
            0.333,
            1.000,
            0.000,
            0.667,
            0.333,
            0.000,
            0.667,
            0.667,
            0.000,
            0.667,
            1.000,
            0.000,
            1.000,
            0.333,
            0.000,
            1.000,
            0.667,
            0.000,
            1.000,
            1.000,
            0.000,
            0.000,
            0.333,
            0.500,
            0.000,
            0.667,
            0.500,
            0.000,
            1.000,
            0.500,
            0.333,
            0.000,
            0.500,
            0.333,
            0.333,
            0.500,
            0.333,
            0.667,
            0.500,
            0.333,
            1.000,
            0.500,
            0.667,
            0.000,
            0.500,
            0.667,
            0.333,
            0.500,
            0.667,
            0.667,
            0.500,
            0.667,
            1.000,
            0.500,
            1.000,
            0.000,
            0.500,
            1.000,
            0.333,
            0.500,
            1.000,
            0.667,
            0.500,
            1.000,
            1.000,
            0.500,
            0.000,
            0.333,
            1.000,
            0.000,
            0.667,
            1.000,
            0.000,
            1.000,
            1.000,
            0.333,
            0.000,
            1.000,
            0.333,
            0.333,
            1.000,
            0.333,
            0.667,
            1.000,
            0.333,
            1.000,
            1.000,
            0.667,
            0.000,
            1.000,
            0.667,
            0.333,
            1.000,
            0.667,
            0.667,
            1.000,
            0.667,
            1.000,
            1.000,
            1.000,
            0.000,
            1.000,
            1.000,
            0.333,
            1.000,
            1.000,
            0.667,
            1.000,
            0.333,
            0.000,
            0.000,
            0.500,
            0.000,
            0.000,
            0.667,
            0.000,
            0.000,
            0.833,
            0.000,
            0.000,
            1.000,
            0.000,
            0.000,
            0.000,
            0.167,
            0.000,
            0.000,
            0.333,
            0.000,
            0.000,
            0.500,
            0.000,
            0.000,
            0.667,
            0.000,
            0.000,
            0.833,
            0.000,
            0.000,
            1.000,
            0.000,
            0.000,
            0.000,
            0.167,
            0.000,
            0.000,
            0.333,
            0.000,
            0.000,
            0.500,
            0.000,
            0.000,
            0.667,
            0.000,
            0.000,
            0.833,
            0.000,
            0.000,
            1.000,
            0.000,
            0.000,
            0.000,
            0.143,
            0.143,
            0.143,
            0.857,
            0.857,
            0.857,
            1.000,
            1.000,
            1.000,
        ]
    )
    .astype(np.floataa)
    .reshape(-1, 3)
)






import functools
from contextlib import contextmanager

import bert_score
from packaging import version

import datasets
@contextmanager
def  __SCREAMING_SNAKE_CASE       (				)       ->  Tuple:
						def filter_log(lowercase__  :List[Any]				):
												return False if "This IS expected if you are initializing" in record.msg else True

						__magic_name__				:							Any				=      datasets.utils.logging.get_logger('transformers.modeling_utils'				)
						logger.addFilter(lowercase__				)
						try:
												yield
						finally:
												logger.removeFilter(lowercase__				)


snake_case__     							= '\\n@inproceedings{bert-score,\n  title={BERTScore: Evaluating Text Generation with BERT},\n  author={Tianyi Zhang* and Varsha Kishore* and Felix Wu* and Kilian Q. Weinberger and Yoav Artzi},\n  booktitle={International Conference on Learning Representations},\n  year={2020},\n  url={https://openreview.net/forum?id=SkeHuCVFDr}\n}\n'

snake_case__     							= '\\nBERTScore leverages the pre-trained contextual embeddings from BERT and matches words in candidate and reference\nsentences by cosine similarity.\nIt has been shown to correlate with human judgment on sentence-level and system-level evaluation.\nMoreover, BERTScore computes precision, recall, and F1 measure, which can be useful for evaluating different language\ngeneration tasks.\n\nSee the project\'s README at https://github.com/Tiiiger/bert_score#readme for more information.\n'

snake_case__     							= '\nBERTScore Metrics with the hashcode from a source against one or more references.\n\nArgs:\n    predictions (list of str): Prediction/candidate sentences.\n    references (list of str or list of list of str): Reference sentences.\n    lang (str): Language of the sentences; required (e.g. \'en\').\n    model_type (str): Bert specification, default using the suggested\n        model for the target language; has to specify at least one of\n        `model_type` or `lang`.\n    num_layers (int): The layer of representation to use,\n        default using the number of layers tuned on WMT16 correlation data.\n    verbose (bool): Turn on intermediate status update.\n    idf (bool or dict): Use idf weighting; can also be a precomputed idf_dict.\n    device (str): On which the contextual embedding model will be allocated on.\n        If this argument is None, the model lives on cuda:0 if cuda is available.\n    nthreads (int): Number of threads.\n    batch_size (int): Bert score processing batch size,\n        at least one of `model_type` or `lang`. `lang` needs to be\n        specified when `rescale_with_baseline` is True.\n    rescale_with_baseline (bool): Rescale bertscore with pre-computed baseline.\n    baseline_path (str): Customized baseline file.\n    use_fast_tokenizer (bool): `use_fast` parameter passed to HF tokenizer. New in version 0.3.10.\n\nReturns:\n    precision: Precision.\n    recall: Recall.\n    f1: F1 score.\n    hashcode: Hashcode of the library.\n\nExamples:\n\n    >>> predictions = ["hello there", "general kenobi"]\n    >>> references = ["hello there", "general kenobi"]\n    >>> bertscore = datasets.load_metric("bertscore")\n    >>> results = bertscore.compute(predictions=predictions, references=references, lang="en")\n    >>> print([round(v, 2) for v in results["f1"]])\n    [1.0, 1.0]\n'



@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION						,       _KWARGS_DESCRIPTION  )
class     snake_case__  (      datasets.Metric  ):
				def  UpperCamelCase_						(  self      ):




										"""simple docstring"""




										return datasets.MetricInfo(
										    description=_DESCRIPTION     ,      citation=_CITATION     ,      homepage='https://github.com/Tiiiger/bert_score'     ,      inputs_description=_KWARGS_DESCRIPTION     ,      features=datasets.Features(
										        {
										            'predictions': datasets.Value('string'     ,      id='sequence'      ),
										            'references': datasets.Sequence(datasets.Value('string'     ,      id='sequence'      )     ,      id='references'      ),
										        }      )     ,      codebase_urls=['https://github.com/Tiiiger/bert_score']     ,      reference_urls=[
										        'https://github.com/Tiiiger/bert_score',
										        'https://arxiv.org/abs/1904.09675',
										    ]     ,      )
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase     ,      _UpperCAmelCase     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=False     ,      _UpperCAmelCase=False     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=64     ,      _UpperCAmelCase=4     ,      _UpperCAmelCase=False     ,      _UpperCAmelCase=False     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=False     ,      ):




										"""simple docstring"""




										__magic_name__				:							List[str]				=      bert_score.utils.get_hash
										__magic_name__				:							Dict				=      bert_score.BERTScorer

										if version.parse(bert_score.__version__      ) >= version.parse('0.3.10'      ):
																__magic_name__				:							Any				=      functools.partial(_UpperCAmelCase     ,      use_fast_tokenizer=_UpperCAmelCase      )
																__magic_name__				:							Tuple				=      functools.partial(_UpperCAmelCase     ,      use_fast_tokenizer=_UpperCAmelCase      )
										elif use_fast_tokenizer:
																raise ImportWarning(
																    'To use a fast tokenizer, the module `bert-score>=0.3.10` is required, and the current version of `bert-score` doesn\'t match this condition.\n'
																    'You can install it with `pip install "bert-score>=0.3.10"`.'      )

										if model_type is None:
																assert lang is not None, "either lang or model_type should be specified"
																__magic_name__				:							List[Any]				=      bert_score.utils.langamodel[lang.lower()]

										if num_layers is None:
																__magic_name__				:							Optional[Any]				=      bert_score.utils.modelalayers[model_type]

										__magic_name__				:							List[str]				=      get_hash(
										    model=_UpperCAmelCase     ,      num_layers=_UpperCAmelCase     ,      idf=_UpperCAmelCase     ,      rescale_with_baseline=_UpperCAmelCase     ,      use_custom_baseline=baseline_path is not None     ,      )

										with filter_logging_context():
																if not hasattr(self     ,      'cached_bertscorer'      ) or self.cached_bertscorer.hash != hashcode:
																						__magic_name__				:							Optional[int]				=      scorer(
																						    model_type=_UpperCAmelCase     ,      num_layers=_UpperCAmelCase     ,      batch_size=_UpperCAmelCase     ,      nthreads=_UpperCAmelCase     ,      all_layers=_UpperCAmelCase     ,      idf=_UpperCAmelCase     ,      device=_UpperCAmelCase     ,      lang=_UpperCAmelCase     ,      rescale_with_baseline=_UpperCAmelCase     ,      baseline_path=_UpperCAmelCase     ,      )

										((__magic_name__)		, (__magic_name__)		, (__magic_name__))				:							List[Any]				=      self.cached_bertscorer.score(
										    cands=_UpperCAmelCase     ,      refs=_UpperCAmelCase     ,      verbose=_UpperCAmelCase     ,      batch_size=_UpperCAmelCase     ,      )
										__magic_name__				:							int				=      {
										    'precision': P.tolist(),
										    'recall': R.tolist(),
										    'f1': F.tolist(),
										    'hashcode': hashcode,
										}
										return output_dict
				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=None     ,      **_UpperCAmelCase      ):




										"""simple docstring"""




										if references is not None:
																__magic_name__				:							List[str]				=      [[ref] if isinstance(_UpperCAmelCase     ,      _UpperCAmelCase      ) else ref for ref in references]
										super().add_batch(predictions=_UpperCAmelCase     ,      references=_UpperCAmelCase     ,      **_UpperCAmelCase      )





				def  UpperCamelCase_						(  self     ,      _UpperCAmelCase=None     ,      _UpperCAmelCase=None     ,      **_UpperCAmelCase      ):




										"""simple docstring"""




										if isinstance(_UpperCAmelCase     ,      _UpperCAmelCase      ):
																__magic_name__				:							List[Any]				=      [reference]
										super().add(prediction=_UpperCAmelCase     ,      reference=_UpperCAmelCase     ,      **_UpperCAmelCase      )


