code: def _warn_if_unobserved_graph_variables(
      graph_variable_names: typing.Set[str],
      data_variable_names: typing.Set[str],
      logger: logging.Logger,
  ):
      """Emits a warning if there are any graph variables that are not observed in the data."""
      unobserved_graph_variable_names = graph_variable_names.difference(
          data_variable_names
      )
  
      if unobserved_graph_variable_names:
          observed_graph_variable_names = (
              graph_variable_names.intersection(data_variable_names)
          )
  
          num_graph_variables = len(graph_variable_names)
          num_unobserved_graph_variables = len(
              unobserved_graph_variable_names
          )
          num_observed_graph_variables = len(
              observed_graph_variable_names
          )
  
          warnings.warn(
              f"{num_unobserved_graph_variables} variables are assumed "
              "unobserved because they are not in the dataset. "
              "Configure the logging level to `logging.WARNING` or higher for additional details."
          )
          logger.warn(
              "The graph defines %d variables. %d were found in the dataset "
              "and will be analyzed as observed variables. %d were not found "
              "in the dataset and will be analyzed as unobserved variables. "
              "The observed variables are: '%s'. "
              "The unobserved variables are: '%s'. "
              "If this matches your expectations for observations, please continue. "
              "If you expected any of the unobserved variables to be in the "
              "dataframe, please check for typos.",
              num_graph_variables,
              num_observed_graph_variables,
              num_unobserved_graph_variables,
              sorted(observed_graph_variable_names),
              sorted(unobserved_graph_variable_names),
          )
  
imports: import logging
  import typing
  import warnings
  from itertools import combinations
  from sympy import init_printing
  import dowhy.causal_estimators
  import dowhy.causal_refuters
  import dowhy.graph_learners
  from dowhy.causal_estimator import CausalEstimate, estimate_effect
  from dowhy.causal_graph import CausalGraph
  from dowhy.causal_identifier import AutoIdentifier, BackdoorAdjustment, IDIdentifier
  from dowhy.causal_identifier.identify_effect import EstimandType
  from dowhy.causal_refuters.graph_refuter import GraphRefuter
  from dowhy.utils.api import parse_state
label_desc: Use image node_id 1 for calling a global function with example usage: _warn_if_unobserved_graph_variables(graph_variable_names, data_variable_names, logger) without return types