def METHOD_NAME(data):
  """Extracts numpy matrix from pandas DataFrame.
  Args:
    data: `pandas.DataFrame` containing the data to be extracted.
  Returns:
    A numpy `ndarray` of the DataFrame's values.
  """
  if not isinstance(data, pd.DataFrame):
    return data
  return data.values