code: def missing_values_analysis(
      train_data: Optional[pd.DataFrame] = None,
      test_data: Optional[pd.DataFrame] = None,
      val_data: Optional[pd.DataFrame] = None,
      graph_type: str = "matrix",
      state: Union[None, dict, AnalysisState] = None,
      return_state: bool = False,
      sample: Union[None, int, float] = DEFAULT_SAMPLE_SIZE,
      **chart_args,
  ):
      """
      Perform quick analysis of missing values across datasets.
  
      Parameters
      ----------
      train_data: Optional[DataFrame]
          training dataset
      test_data: Optional[DataFrame], default = None
          test dataset
      val_data
          validation dataset
      graph_type: str, default = 'matrix'
          One of the following visualization types:
          - matrix - nullity matrix is a data-dense display which lets you quickly visually pick out patterns in data completion
              This visualization will comfortably accommodate up to 50 labelled variables.
              Past that range labels begin to overlap or become unreadable, and by default large displays omit them.
          - bar - visualizes how many rows are non-null vs null in the column. Logarithmic scale can by specifying `log=True` in `kwargs`
          - heatmap - correlation heatmap measures nullity correlation: how strongly the presence or absence of one
              variable affects the presence of another. Nullity correlation ranges from -1
              (if one variable appears the other definitely does not) to 0 (variables appearing or not appearing have no effect on one another)
              to 1 (if one variable appears the other definitely also does).
              Entries marked <1 or >-1 have a correlation that is close to being exactingly negative or positive but is still not quite perfectly so.
          - dendrogram - the dendrogram allows to more fully correlate variable completion, revealing trends deeper than the pairwise ones
              visible in the correlation heatmap. The dendrogram uses a hierarchical clustering algorithm (courtesy of scipy) to bin variables
              against one another by their nullity correlation (measured in terms of binary distance).
              At each step of the tree the variables are split up based on which combination minimizes the distance of the remaining clusters.
              The more monotone the set of variables, the closer their total distance is to zero, and the closer their average distance (the y-axis) is to zero.
      state: Union[None, dict, AnalysisState], default = None
          pass prior state if necessary; the object will be updated during `anlz_facets` `fit` call.
      return_state: bool, default = False
          return state if `True`
      sample: Union[None, int, float], default = 10000
          sample size; if `int`, then row number is used;
          `float` must be between 0.0 and 1.0 and represents fraction of dataset to sample;
          `None` means no sampling
          See also :func:`autogluon.eda.analysis.dataset.Sampler`
  
      Returns
      -------
      state after `fit` call if `return_state` is `True`; `None` otherwise
  
      Examples
      --------
      >>> import autogluon.eda.auto as auto
      >>>
      >>> auto.missing_values_analysis(train_data=...)
  
      See Also
      --------
      :py:class:`~autogluon.eda.analysis.missing.MissingValuesAnalysis`
      :py:class:`~autogluon.eda.visualization.dataset.DatasetStatistics`
      :py:class:`~autogluon.eda.visualization.missing.MissingValues`
  
      """
      # TODO add null equivalents: i.e. >50% of values are the same (i.e. 0 is frequently used as null equivalent)
      return analyze(
          train_data=train_data,
          test_data=test_data,
          val_data=val_data,
          state=state,
          return_state=return_state,
          sample=sample,
          anlz_facets=[
              MissingValuesAnalysis(),
          ],
          viz_facets=[
              MarkdownSectionComponent("### Missing Values Analysis"),
              DatasetStatistics(),
              MissingValues(graph_type=graph_type, **chart_args),
          ],
      )
  
imports: import logging
  from typing import Any, Dict, List, Optional, Tuple, Union
  import pandas
  from autogluon.common.utils.log_utils import verbosity2loglevel
  from autogluon.features import CategoryFeatureGenerator
  from autogluon.tabular import TabularPredictor
  from ..None import AnalysisState
  from ..analysis import AnomalyDetectorAnalysis, ApplyFeatureGenerator, AutoGluonModelEvaluator, AutoGluonModelQuickFit, Correlation, DistributionFit, FeatureInteraction, MissingValuesAnalysis, ProblemTypeControl, ShapAnalysis, TrainValidationSplit, XShiftDetector
  from ..analysis.base import AbstractAnalysis, BaseAnalysis, SaveArgsToState
  from ..analysis.dataset import DatasetSummary, LabelInsightsAnalysis, RawTypesAnalysis, Sampler, SpecialTypesAnalysis, VariableTypeAnalysis
  from ..analysis.interaction import FeatureDistanceAnalysis
  from ..state import is_key_present_in_state
  from ..utils.common import expand_nested_args_into_nested_maps, get_empty_dict_if_none
  from ..utils.defaults import QuickFitDefaults
  from ..visualization import AnomalyScoresVisualization, ConfusionMatrix, CorrelationVisualization, DatasetStatistics, DatasetTypeMismatch, ExplainForcePlot, ExplainWaterfallPlot, FeatureImportance, FeatureInteractionVisualization, LabelInsightsVisualization, MarkdownSectionComponent, MissingValues, ModelLeaderboard, PropertyRendererComponent, RegressionEvaluation, XShiftSummary
  from ..visualization.base import AbstractVisualization
  from ..visualization.interaction import FeatureDistanceAnalysisVisualization, PDPInteractions
  from ..visualization.layouts import SimpleVerticalLinearLayout
label_desc: Use image node_id 13 for calling a global function with example usage: missing_values_analysis(train_data, test_data, val_data, graph_type, state, return_state, sample) and returns: analyze