code: def _validate_origin(origin: str) -> None:
      """
      Checks that origin has a valid value. One of:
          - unknown: edge exists for an unknown reason;
          - learned: edge was created as the output of a machine-learning process;
          - expert: edge was created by a domain expert.
  
      Args:
          origin: the value to validate.
  
      Raises:
          ValueError: if origin is not valid.
      """
      allowed = {"unknown", "learned", "expert"}
  
      if origin not in allowed:
          raise ValueError(
              f"Unknown origin: must be one of {allowed} - got `{origin}`."
          )
  
file_path: causalnex/causalnex/structure/structuremodel.py
imports: from typing import Any, Hashable, List, Set, Tuple, Union
  import networkx
  import numpy
  from networkx.exception import NodeNotFound
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_origin(origin) without return types