docstr: ```
  Cheks and transforms array of targets. Targets are transformed in place.
  Args:
    class_names(list):  labels associated with targets (e.g., ['negative', 'positive'])
                   Only used/required if:
                   1. targets are one/multi-hot-encoded
                   2. targets are integers and represent class IDs for classification task
                   Not required if:
                   1. targets are numeric and task is regression
                   2. targets are strings and task is classification (class_names are populated automatically)
    label_encoder(LabelEncoder): a prior instance of LabelEncoder.
                                 If None, will be created when train=True
  ```
code: def __init__(self, class_names=[], label_encoder=None):
      """
      ```
      Cheks and transforms array of targets. Targets are transformed in place.
      Args:
        class_names(list):  labels associated with targets (e.g., ['negative', 'positive'])
                       Only used/required if:
                       1. targets are one/multi-hot-encoded
                       2. targets are integers and represent class IDs for classification task
                       Not required if:
                       1. targets are numeric and task is regression
                       2. targets are strings and task is classification (class_names are populated automatically)
        label_encoder(LabelEncoder): a prior instance of LabelEncoder.
                                     If None, will be created when train=True
      ```
      """
      if type(class_names) != list:
          if isinstance(class_names, (pd.Series, np.ndarray)):
              class_names = class_names.tolist()
          else:
              raise ValueError("class_names must be list")
      self.c = class_names
      self.le = label_encoder
      self.train_called = False
  
imports: from .imports import *
  from subprocess import Popen
label_desc: Use image node_id 1 to create a new YTransform object  with example: obj = YTransform(class_names, label_encoder)