code: def check_fmt(fmt):
      """Check annotation format.
  
      Parameters
      ----------
      fmt : str {"sparse", "dense"}
          Annotation format
  
      Returns
      -------
      fmt : str
          Checked annotation format.
      """
      valid_fmts = ["sparse", "dense"]
      if fmt not in valid_fmts:
          raise ValueError(
              f"`fmt` must be in: {valid_fmts}, but found: {fmt}."
          )
  
label_desc: Use image node_id 1 for calling a global function with example usage: check_fmt(fmt) without return types