
from __future__ import annotations

import unittest

from transformers import is_tf_available
from transformers.testing_utils import require_tf, slow

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
     import tensorflow as tf

     from transformers import (
         TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
         TFXLMForMultipleChoice,
         TFXLMForQuestionAnsweringSimple,
         TFXLMForSequenceClassification,
         TFXLMForTokenClassification,
         TFXLMModel,
         TFXLMWithLMHeadModel,
         XLMConfig,
     )


class 							lowerCamelCase       :



  """simple docstring"""





  def __init__(					self						,    __UpperCamelCase						,    ):
      A_								=					parent
      A_								=					13
      A_								=					7
      A_								=					True
      A_								=					True
      A_								=					True
      A_								=					True
      A_								=					True
      A_								=					False
      A_								=					False
      A_								=					False
      A_								=					2
      A_								=					99
      A_								=					0
      A_								=					32
      A_								=					2
      A_								=					4
      A_								=					0.1
      A_								=					0.1
      A_								=					512
      A_								=					16
      A_								=					2
      A_								=					0.02
      A_								=					3
      A_								=					4
      A_								=					"last"
      A_								=					True
      A_								=					None
      A_								=					0

  def 					lowercase_						(					self					):
      A_								=					ids_tensor([self.batch_size, self.seq_length]						,    self.vocab_size					)
      A_								=					random_attention_mask([self.batch_size, self.seq_length]						,    dtype=tf.floataa					)

      A_								=					None
      if self.use_input_lengths:
          A_								=					(
              ids_tensor([self.batch_size]						,    vocab_size=2					) + self.seq_length - 2
          )  # small variation of seq_length

      A_								=					None
      if self.use_token_type_ids:
          A_								=					ids_tensor([self.batch_size, self.seq_length]						,    self.n_langs					)

      A_								=					None
      A_								=					None
      A_								=					None
      if self.use_labels:
          A_								=					ids_tensor([self.batch_size]						,    self.type_sequence_label_size					)
          A_								=					ids_tensor([self.batch_size, self.seq_length]						,    self.num_labels					)
          A_								=					ids_tensor([self.batch_size]						,    2						,    dtype=tf.floataa					)
          A_								=					ids_tensor([self.batch_size]						,    self.num_choices					)

      A_								=					XLMConfig(
          vocab_size=self.vocab_size						,    n_special=self.n_special						,    emb_dim=self.hidden_size						,    n_layers=self.num_hidden_layers						,    n_heads=self.num_attention_heads						,    dropout=self.hidden_dropout_prob						,    attention_dropout=self.attention_probs_dropout_prob						,    gelu_activation=self.gelu_activation						,    sinusoidal_embeddings=self.sinusoidal_embeddings						,    asm=self.asm						,    causal=self.causal						,    n_langs=self.n_langs						,    max_position_embeddings=self.max_position_embeddings						,    initializer_range=self.initializer_range						,    summary_type=self.summary_type						,    use_proj=self.use_proj						,    bos_token_id=self.bos_token_id						,    )

      return (
          config,
          input_ids,
          token_type_ids,
          input_lengths,
          sequence_labels,
          token_labels,
          is_impossible_labels,
          choice_labels,
          input_mask,
      )

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    ):
      A_								=					TFXLMModel(config=__UpperCamelCase					)
      A_								=					{"input_ids": input_ids, "lengths": input_lengths, "langs": token_type_ids}
      A_								=					model(__UpperCamelCase					)

      A_								=					[input_ids, input_mask]
      A_								=					model(__UpperCamelCase					)
      self.parent.assertEqual(result.last_hidden_state.shape						,    (self.batch_size, self.seq_length, self.hidden_size)					)

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    ):
      A_								=					TFXLMWithLMHeadModel(__UpperCamelCase					)

      A_								=					{"input_ids": input_ids, "lengths": input_lengths, "langs": token_type_ids}
      A_								=					model(__UpperCamelCase					)

      A_								=					outputs

      self.parent.assertEqual(result.logits.shape						,    (self.batch_size, self.seq_length, self.vocab_size)					)

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    ):
      A_								=					TFXLMForQuestionAnsweringSimple(__UpperCamelCase					)

      A_								=					{"input_ids": input_ids, "lengths": input_lengths}

      A_								=					model(__UpperCamelCase					)

      self.parent.assertEqual(result.start_logits.shape						,    (self.batch_size, self.seq_length)					)
      self.parent.assertEqual(result.end_logits.shape						,    (self.batch_size, self.seq_length)					)

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    ):
      A_								=					TFXLMForSequenceClassification(__UpperCamelCase					)

      A_								=					{"input_ids": input_ids, "lengths": input_lengths}

      A_								=					model(__UpperCamelCase					)

      self.parent.assertEqual(result.logits.shape						,    (self.batch_size, self.type_sequence_label_size)					)

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    ):
      A_								=					self.num_labels
      A_								=					TFXLMForTokenClassification(config=__UpperCamelCase					)
      A_								=					{"input_ids": input_ids, "attention_mask": input_mask, "token_type_ids": token_type_ids}
      A_								=					model(__UpperCamelCase					)
      self.parent.assertEqual(result.logits.shape						,    (self.batch_size, self.seq_length, self.num_labels)					)

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    ):
      A_								=					self.num_choices
      A_								=					TFXLMForMultipleChoice(config=__UpperCamelCase					)
      A_								=					tf.tile(tf.expand_dims(__UpperCamelCase						,    1					)						,    (1, self.num_choices, 1)					)
      A_								=					tf.tile(tf.expand_dims(__UpperCamelCase						,    1					)						,    (1, self.num_choices, 1)					)
      A_								=					tf.tile(tf.expand_dims(__UpperCamelCase						,    1					)						,    (1, self.num_choices, 1)					)
      A_								=					{
          "input_ids": multiple_choice_inputs_ids,
          "attention_mask": multiple_choice_input_mask,
          "token_type_ids": multiple_choice_token_type_ids,
      }
      A_								=					model(__UpperCamelCase					)
      self.parent.assertEqual(result.logits.shape						,    (self.batch_size, self.num_choices)					)

  def 					lowercase_						(					self					):
      A_								=					self.prepare_config_and_inputs()
      (
          (
          A_
      )	,	(
          A_
      )	,	(
          A_
      )	,	(
          A_
      )	,	(
          A_
      )	,	(
          A_
      )	,	(
          A_
      )	,	(
          A_
      )	,	(
          A_
      )	,	
      )								=					config_and_inputs
      A_								=					{
          "input_ids": input_ids,
          "token_type_ids": token_type_ids,
          "langs": token_type_ids,
          "lengths": input_lengths,
      }
      return config, inputs_dict



@require_tf
class 							lowerCamelCase       (		__snake_case			,  __snake_case			,  unittest.TestCase					):



  """simple docstring"""





  lowerCAmelCase_								=		(
      (
          TFXLMModel,
          TFXLMWithLMHeadModel,
          TFXLMForSequenceClassification,
          TFXLMForQuestionAnsweringSimple,
          TFXLMForTokenClassification,
          TFXLMForMultipleChoice,
      )
      if is_tf_available()
      else ()
  )
  lowerCAmelCase_								=		(
      (TFXLMWithLMHeadModel,) if is_tf_available() else ()
  )  # TODO (PVP): Check other models whether language generation is also applicable
  lowerCAmelCase_								=		(
      {
          """feature-extraction""": TFXLMModel,
          """fill-mask""": TFXLMWithLMHeadModel,
          """question-answering""": TFXLMForQuestionAnsweringSimple,
          """text-classification""": TFXLMForSequenceClassification,
          """text-generation""": TFXLMWithLMHeadModel,
          """token-classification""": TFXLMForTokenClassification,
          """zero-shot""": TFXLMForSequenceClassification,
      }
      if is_tf_available()
      else {}
  )
  lowerCAmelCase_								=		False
  lowerCAmelCase_								=		False

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase					):
      if (
          pipeline_test_casse_name == "QAPipelineTests"
          and tokenizer_name is not None
          and not tokenizer_name.endswith("Fast"					)
      ):
          # `QAPipelineTests` fails for a few models when the slower tokenizer are used.
          # (The slower tokenizers were never used for pipeline tests before the pipeline testing rework)
          # TODO: check (and possibly fix) the `QAPipelineTests` with slower tokenizer
          return True

      return False

  def 					lowercase_						(					self					):
      A_								=					TFXLMModelTester(self					)
      A_								=					ConfigTester(self						,    config_class=__UpperCamelCase						,    emb_dim=37					)

  def 					lowercase_						(					self					):
      self.config_tester.run_common_tests()

  def 					lowercase_						(					self					):
      A_								=					self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_xlm_model(*__UpperCamelCase					)

  def 					lowercase_						(					self					):
      A_								=					self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_xlm_lm_head(*__UpperCamelCase					)

  def 					lowercase_						(					self					):
      A_								=					self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_xlm_qa(*__UpperCamelCase					)

  def 					lowercase_						(					self					):
      A_								=					self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_xlm_sequence_classif(*__UpperCamelCase					)

  def 					lowercase_						(					self					):
      A_								=					self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_xlm_for_token_classification(*__UpperCamelCase					)

  def 					lowercase_						(					self					):
      A_								=					self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_xlm_for_multiple_choice(*__UpperCamelCase					)

  @slow
  def 					lowercase_						(					self					):
      for model_name in TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
          A_								=					TFXLMModel.from_pretrained(__UpperCamelCase					)
          self.assertIsNotNone(__UpperCamelCase					)



@require_tf
class 							lowerCamelCase       (		unittest.TestCase					):



  """simple docstring"""





  @slow
  def 					lowercase_						(					self					):
      A_								=					TFXLMWithLMHeadModel.from_pretrained("xlm-mlm-en-2048"					)
      A_								=					tf.convert_to_tensor([[14, 447]]						,    dtype=tf.intaa					)  # the president
      A_								=					[
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
      ]  # the president the president the president the president the president the president the president the president the president the president
      # TODO(PVP): this and other input_ids I tried for generation give pretty bad results. Not sure why. Model might just not be made for auto-regressive inference
      A_								=					model.generate(__UpperCamelCase						,    do_sample=__UpperCamelCase					)
      self.assertListEqual(output_ids[0].numpy().tolist()						,    __UpperCamelCase					)








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


__magic_name__  :  Dict     			=   1_0_0_0


class 							lowerCamelCase       :



  """simple docstring"""





  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						,    ):
      if isinstance(__UpperCamelCase						,    torch.Tensor					):
          A_								=					img.numpy().astype("np.uint8"					)
      if isinstance(__UpperCamelCase						,    __UpperCamelCase					):
          A_								=					img_tensorize(__UpperCamelCase					)
      assert isinstance(__UpperCamelCase						,    np.ndarray					)

      A_	,	A_								=					img.shape[1], img.shape[0]
      A_								=					mplfigure.Figure(frameon=__UpperCamelCase					)
      A_								=					fig.get_dpi()
      A_								=					(width * scale + 1E-2) / dpi
      A_								=					(height * scale + 1E-2) / dpi
      fig.set_size_inches(__UpperCamelCase						,    __UpperCamelCase					)
      A_								=					fig.add_axes([0.0, 0.0, 1.0, 1.0]					)
      ax.axis("off"					)
      ax.set_xlim(0.0						,    __UpperCamelCase					)
      ax.set_ylim(__UpperCamelCase					)

      A_								=					saveas
      A_								=					rgb
      A_								=					pynb
      A_								=					img
      A_								=					edgecolor
      A_								=					0.5
      A_								=					linestyle
      A_								=					int(np.sqrt(min(__UpperCamelCase						,    __UpperCamelCase					)					) * scale // 3					)
      A_								=					width
      A_								=					height
      A_								=					scale
      A_								=					fig
      A_								=					ax
      A_								=					pad
      A_								=					idaobj
      A_								=					idaattr
      A_								=					FigureCanvasAgg(__UpperCamelCase					)

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase=None					):
      if color is None:
          A_								=					self.edgecolor
      ((A_)	,	(A_)	,	(A_)	,	(A_))								=					box
      A_								=					xa - xa
      A_								=					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 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase=None						,    __UpperCamelCase=None						,    __UpperCamelCase=None						,    __UpperCamelCase=None					):
      if len(boxes.shape					) > 2:
          A_								=					boxes[0]
      if len(obj_ids.shape					) > 1:
          A_								=					obj_ids[0]
      if len(obj_scores.shape					) > 1:
          A_								=					obj_scores[0]
      if len(attr_ids.shape					) > 1:
          A_								=					attr_ids[0]
      if len(attr_scores.shape					) > 1:
          A_								=					attr_scores[0]
      if isinstance(__UpperCamelCase						,    torch.Tensor					):
          A_								=					boxes.numpy()
      if isinstance(__UpperCamelCase						,    __UpperCamelCase					):
          A_								=					np.array(__UpperCamelCase					)
      assert isinstance(__UpperCamelCase						,    np.ndarray					)
      A_								=					np.prod(boxes[:, 2:] - boxes[:, :2]						,    axis=1					)
      A_								=					np.argsort(-areas					).tolist()
      A_								=					boxes[sorted_idxs] if boxes is not None else None
      A_								=					obj_ids[sorted_idxs] if obj_ids is not None else None
      A_								=					obj_scores[sorted_idxs] if obj_scores is not None else None
      A_								=					attr_ids[sorted_idxs] if attr_ids is not None else None
      A_								=					attr_scores[sorted_idxs] if attr_scores is not None else None

      A_								=					[self._random_color(maximum=1					) for _ in range(len(__UpperCamelCase					)					)]
      A_								=					[assigned_colors[idx] for idx in sorted_idxs]
      if obj_ids is not None:
          A_								=					self._create_text_labels_attr(__UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase					)
          for i in range(len(__UpperCamelCase					)					):
              A_								=					assigned_colors[i]
              self.add_box(boxes[i]						,    __UpperCamelCase					)
              self.draw_labels(labels[i]						,    boxes[i]						,    __UpperCamelCase					)

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase					):
      A_	,	A_	,	A_	,	A_								=					box
      A_								=					(xa, ya)
      A_								=					(ya - ya) * (xa - xa)
      A_								=					_SMALL_OBJ * self.scale
      if instance_area < small or ya - ya < 40 * self.scale:
          if ya >= self.height - 5:
              A_								=					(xa, ya)
          else:
              A_								=					(xa, ya)

      A_								=					(ya - ya) / np.sqrt(self.height * self.width					)
      A_								=					self._change_color_brightness(__UpperCamelCase						,    brightness_factor=0.7					)
      A_								=					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 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase="g"						,    __UpperCamelCase="left"						,    ):
      A_								=					0
      A_								=					self.font_size
      A_								=					np.maximum(list(mplc.to_rgb(__UpperCamelCase					)					)						,    0.2					)
      A_								=					max(0.8						,    np.max(__UpperCamelCase					)					)
      A_								=					{
          "facecolor": "black",
          "alpha": self.alpha,
          "pad": self.pad,
          "edgecolor": "none",
      }
      A_	,	A_								=					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 					lowercase_						(					self						,    __UpperCamelCase=None					):
      if saveas is None:
          A_								=					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 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase					):
      A_								=					[self.idaobj[i] for i in classes]
      A_								=					[self.idaattr[i] for i in attr_classes]
      A_								=					[
          f'{label} {score:.2f} {attr} {attr_score:.2f}'
          for label, score, attr, attr_score in zip(__UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase						,    __UpperCamelCase					)
      ]
      return labels

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase					):
      A_								=					[self.idaobj[i] for i in classes]
      if scores is not None:
          if labels is None:
              A_								=					["{:.0f}%".format(s * 100					) for s in scores]
          else:
              A_								=					["{} {:.0f}%".format(__UpperCamelCase						,    s * 100					) for li, s in zip(__UpperCamelCase						,    __UpperCamelCase					)]
      return labels

  def 					lowercase_						(					self						,    __UpperCamelCase=255					):
      A_								=					np.random.randint(0						,    len(_COLORS					)					)
      A_								=					_COLORS[idx] * maximum
      if not self.rgb:
          A_								=					ret[::-1]
      return ret

  def 					lowercase_						(					self					):
      if not self.pynb:
          A_	,	A_								=					self.canvas.print_to_buffer()
          if (width, height) != (self.width, self.height):
              A_								=					cva.resize(self.img						,    (width, height)					)
          else:
              A_								=					self.img
      else:
          A_								=					io.BytesIO()  # works for cairo backend
          self.canvas.print_rgba(__UpperCamelCase					)
          A_	,	A_								=					self.width, self.height
          A_								=					buf.getvalue()
          A_								=					self.img

      A_								=					np.frombuffer(__UpperCamelCase						,    dtype="uint8"					)
      A_								=					buffer.reshape(__UpperCamelCase						,    __UpperCamelCase						,    4					)
      A_	,	A_								=					np.split(__UpperCamelCase						,    [3]						,    axis=2					)

      try:
          import numexpr as ne  # fuse them with numexpr

          A_								=					ne.evaluate("img * (1 - alpha / 255.0) + rgb * (alpha / 255.0)"					)
      except ImportError:
          A_								=					alpha.astype("float32"					) / 255.0
          A_								=					img * (1 - alpha) + rgb * alpha

      return visualized_image.astype("uint8"					)

  def 					lowercase_						(					self						,    __UpperCamelCase						,    __UpperCamelCase					):
      assert brightness_factor >= -1.0 and brightness_factor <= 1.0
      A_								=					mplc.to_rgb(__UpperCamelCase					)
      A_								=					colorsys.rgb_to_hls(*mplc.to_rgb(__UpperCamelCase					)					)
      A_								=					polygon_color[1] + (brightness_factor * polygon_color[1])
      A_								=					0.0 if modified_lightness < 0.0 else modified_lightness
      A_								=					1.0 if modified_lightness > 1.0 else modified_lightness
      A_								=					colorsys.hls_to_rgb(polygon_color[0]						,    __UpperCamelCase						,    polygon_color[2]					)
      return modified_color



__magic_name__  :  List[str]     			=   (
    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)
)






