code: def find_extension(codec):
      """Returns the correspondent file extension for a codec.
  
      Parameters
      ----------
  
      codec : str
        Video or audio codec name.
      """
      if codec in extensions_dict:
          # codec is already the extension
          return codec
  
      for ext, infos in extensions_dict.items():
          if codec in infos.get("codec", []):
              return ext
      raise ValueError(
          "The audio_codec you chose is unknown by MoviePy. "
          "You should report this. In the meantime, you can "
          "specify a temp_audiofile with the right extension "
          "in write_videofile."
      )
  
file_path: moviepy/moviepy/tools.py
imports: import os
  import subprocess
  import warnings
  import proglog
label_desc: Use image node_id 5 for calling a global function with example usage: find_extension(codec) and returns: codec, ext