code: def _get_subtype_for_sphere(encoding: str, bits_per_sample: int):
      if encoding in (None, "PCM_S"):
          return (
              f"PCM_{bits_per_sample}" if bits_per_sample else "PCM_32"
          )
      if encoding in ("PCM_U", "PCM_F"):
          raise ValueError(f"sph does not support {encoding} encoding.")
      if encoding == "ULAW":
          if bits_per_sample in (None, 8):
              return "ULAW"
          raise ValueError(
              "sph only supports 8-bit for mu-law encoding."
          )
      if encoding == "ALAW":
          return "ALAW"
      raise ValueError(f"sph does not support {encoding}.")
  
file_path: audio/src/torchaudio/_backend/soundfile_backend.py
imports: import warnings
  from typing import Optional, Tuple
  import torch
  from torchaudio._internal import module_utils
  from .common import AudioMetaData
label_desc: Use image node_id 6 for calling a global function with example usage: _get_subtype_for_sphere(encoding, bits_per_sample) and returns: unknown, str, str