docstr: Ensures the output shape of images (InputSpecs)
docstr_tok: ["Ensures","the","output","shape","of","images","(","InputSpecs",")"]
code: def _ensure_shape(self, img, labels):
      """Ensures the output shape of images (InputSpecs)"""
      img = tf.ensure_shape(img, (*self.shape, 3), name="image")
      return img, labels
  
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 5 for calling the Clf obj's underlying member method code with example usage: obj._ensure_shape(img, labels) and returns: img,  labels