code: def __init__(self, reference: tp.Optional[np.ndarray] = None) -> None:
      if reference is not None:
          self.reference = reference
          assert len(self.reference.shape) == 3, self.reference.shape
          assert self.reference.min() >= 0.0
          assert (
              self.reference.max() <= 256.0
          ), f"Image max = {self.reference.max()}"
          assert (
              self.reference.max() > 3.0
          )  # Not totally sure but entirely black images are not very cool.
          self.domain_shape = self.reference.shape
  
imports: import os
  import typing
  import torch
  import numpy
  import cv2
  from nevergrad.functions.base import UnsupportedExperiment
  from nevergrad.common.decorators import Registry
label_desc: Use image node_id 1 to create a new ImageLoss object  with example: obj = ImageLoss(reference)