code: def _get_sample_fmt(dtype: torch.dtype):
      types = {
          torch.uint8: "u8",
          torch.int16: "s16",
          torch.int32: "s32",
          torch.float32: "flt",
          torch.float64: "dbl",
      }
      if dtype not in types:
          raise ValueError(
              f"Unsupported dtype is provided {dtype}. Supported dtypes are: {types.keys()}"
          )
      return types[dtype]
  
imports: import io
  from typing import Iterator, List, Optional
  import torch
  from torch import Tensor
  from torio.io._streaming_media_decoder import _get_afilter_desc, StreamingMediaDecoder
  from torio.io._streaming_media_encoder import CodecConfig, StreamingMediaEncoder
label_desc: Use image node_id 1 for calling a global function with example usage: _get_sample_fmt(dtype) and returns: types