code: def _yml_to_py(yml_path: Union[str, Path], py_path: Union[str, Path]):
      """Convert yml file that defines ner labels to python script."""
      yml_path = Path(yml_path)
      py_path = Path(py_path)
      with yml_path.open() as f, py_path.open("w") as fw:
          d = yaml.safe_load(f)
          keys = sorted(_extract_keys(d))
          _generate_py(fw, keys)
  
file_path: camphr/packages/camphr/camphr/ner_labels/utils.py
imports: import yaml
  from pathlib import Path
  from typing import IO, Dict, Iterable, List, Optional, Union
  import json
  from typing_extensions import Literal
label_desc: Use image node_id 4 for calling a global function with example usage: _yml_to_py(yml_path, py_path) without return types