code: def _check_data(data):
      """Performs validation checks on pandas input data."""
      # Defer import to avoid a package-level Pandas dep.
      import pandas as pd  # pylint: disable=g-import-not-at-top
  
      if not isinstance(data, (pd.Series, pd.DataFrame)):
          raise TypeError("Expected a pandas Series or DataFrame.")
      if data.empty:
          raise ValueError("Input data is empty")
      if not isinstance(
          data.index, pd.core.indexes.datetimes.DatetimeIndex
      ):
          raise ValueError("Input data index is not a DatetimeIndex")
      if data.values.dtype not in _VALID_DATA_TYPES:
          raise ValueError(
              "Invalid data type. "
              "Valid types are: {}. ".format(_VALID_DATA_TYPES)
              + "Received: {}".format(data.values.dtype)
          )
      if not data.index.is_monotonic_increasing:
          raise ValueError("Input data index is not sorted.")
  
file_path: probability/tensorflow_probability/python/sts/regularization.py
imports: import collections
  import itertools
  import math
  import warnings
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _check_data(data) without return types