original_docstring: 
      Plot 9 images (3x3) or less. If more are provided, the firtst 9 are returned.
      Args:
          images (list of np.arrays, paths): images to plot. A list of numpy arrays and/or local path strings.
          fig_size (tuple): the figure size, default (10, 10)
          show_axes (bool): if True, show axes
      Returns:
          Plot of 9 or less images
      
docstring: Plot 9 images (3x3) or less. If more are provided, the firtst 9 are returned.
docstring_tokens: Plot 9 images ( 3x3 ) or less . If more are provided the firtst 9 are returned .
code: def plot_images(images, fig_size=(10,10), show_axes=True):
      '''
      Plot 9 images (3x3) or less. If more are provided, the firtst 9 are returned.
      Args:
          images (list of np.arrays, paths): images to plot. A list of numpy arrays and/or local path strings.
          fig_size (tuple): the figure size, default (10, 10)
          show_axes (bool): if True, show axes
      Returns:
          Plot of 9 or less images
      '''
      images = images[:9]
  
      def plt_img(imgs):
          plt.figure(figsize=fig_size)
  
          for idx, img in enumerate(imgs):
              shape_two = len(img.shape) == 2
              plt.subplot(3, 3, idx+1)
              plt.imshow(img, cmap='gray') if shape_two else plt.imshow(img)
              plt.axis(show_axes)
  
          plt.tight_layout()
          plt.show()
       
      for idx, img in enumerate(images):
          if not isinstance(img, (np.ndarray, str, tf.Tensor)):
              raise TypeError(f'The input type must be a list of numpy arrays, strings or tf tensors but got {type(img)}')
  
          if isinstance(img, str):
              if not os.path.exists(img):
                  raise ValueError(f'The string "{img}" is not a valid local path.')
              else:
                  images[idx] = plt.imread(img)
          if isinstance(img, tf.Tensor):
              images[idx] = img.numpy()
                  
      return plt_img(images)
code_tokens: def plot_images ( images , fig_size = ( 10 , 10 ) , show_axes = True ) : images = images [ : 9 ] def plt_img ( imgs ) : plt . figure ( figsize = fig_size ) for idx , img in enumerate ( imgs ) : shape_two = len ( img . shape ) == 2 plt . subplot ( 3 , 3 , idx + 1 ) plt . imshow ( img , cmap = 'gray' ) if shape_two else plt . imshow ( img ) plt . axis ( show_axes ) plt . tight_layout ( ) plt . show ( ) for idx , img in enumerate ( images ) : if not isinstance ( img , ( np . ndarray , str , tf . Tensor ) ) : raise TypeError ( f'The input type must be a list of numpy arrays, strings or tf tensors but got {type(img)}' ) if isinstance ( img , str ) : if not os . path . exists ( img ) : raise ValueError ( f'The string "{img}" is not a valid local path.' ) else : images [ idx ] = plt . imread ( img ) if isinstance ( img , tf . Tensor ) : images [ idx ] = img . numpy ( ) return plt_img ( images )
short_docstring: Plot 9 images (3x3) or less.
short_docstring_tokens: Plot 9 images ( 3x3 ) or less .
comment: '''
      Plot 9 images (3x3) or less. If more are provided, the firtst 9 are returned.
      Args:
          images (list of np.arrays, paths): images to plot. A list of numpy arrays and/or local path strings.
          fig_size (tuple): the figure size, default (10, 10)
          show_axes (bool): if True, show axes
      Returns:
          Plot of 9 or less images
      '''