class_docstr: Data class for input data for the nodes
      
class_docstr_tok: ["Data","class","for","input","data","for","the","nodes"]
docstr: Returns number of classes that are present in the target.
  NB: if some labels are not present in this data, then
  number of classes can be less than in the full dataset!
code: def num_classes(self) -> Optional[int]:
      """Returns number of classes that are present in the target.
      NB: if some labels are not present in this data, then
      number of classes can be less than in the full dataset!"""
      unique_values = self.class_labels
      return len(unique_values) if unique_values is not None else None
  
imports: from __future__ import annotations
  import glob
  import os
  from copy import copy, deepcopy
  from dataclasses import dataclass, field
  from typing import Any, Iterable, List, Optional, Tuple, Union
  import numpy
  import pandas
  from golem.core.log import default_log
  from golem.utilities.requirements_notificator import warn_requirement
  from fedot.core.data.array_utilities import atleast_2d
  from fedot.core.data.load_data import JSONBatchLoader, TextBatchLoader
  from fedot.core.data.supplementary_data import SupplementaryData
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
label_desc: Use image node_id 2 for calling the InputData obj's underlying member method code with example usage: obj.num_classes() and returns: unknown