docstr: Args:
      `path` :str
      `size`: None or tuple
  Returns:
      image, label
docstr_tok: ["Args",":","`","path","`",":","str","`","size","`",":","None","or","tuple","Returns",":","image",",","label"]
code: def _process_path(self, path: str):
      """
      Args:
          `path` :str
          `size`: None or tuple
      Returns:
          image, label
      """
      if not isinstance(path, (str, tf.Tensor)):
          raise AssertionError(
              f"type of path is {type(path)}, expected type str"
          )
      img = read_image(path)
  
      # py_function will degrade performance
      if self.shape:
          [
              img,
          ] = tf.py_function(
              resize_image, [img, self.shape], [tf.float32]
          )
      #         if self.shape:
      #             img = tf.image.resize(img, self.shape)
  
      label = tf.strings.split(path, os.path.sep)[-2]
      label = (
          self._lookup_class_to_idx.lookup(label)
          if self._lookup_class_to_idx
          else label
      )
      return img, label
  
imports: import math
  import os
  import pathlib
  from glob import glob
  from typing import List, Optional, Union
  import matplotlib.pyplot
  import tensorflow
  from chitra.image.tf_image import read_image, resize_image
  from .core import remove_dsstore
  from .utility.tf_utils import get_basename
label_desc: Use image node_id 4 for calling the Clf obj's underlying member method code with example usage: obj._process_path(path) and returns: img,  label