code: def _valid_img(img: Tensor) -> bool:
      """check that input is a valid image to the network."""
      value_check = bool((img.max() <= 1.0) and (img.min() >= 0.0))
      return (img.ndim == 4) and (img.shape[1] == 3) and value_check
  
file_path: NeuralCompression/neuralcompression/metrics/_dists.py
imports: from typing import Any, List
  import torch
  from DISTS_pytorch import DISTS
  from torch import Tensor
  from torchmetrics.metric import Metric
  from typing_extensions import Literal
label_desc: Use image node_id 1 for calling a global function with example usage: _valid_img(img) and returns: unknown