docstr: Parse the high-frequency data to a numpy array.
docstr_tok: ["Parse","the","high-frequency","data","to","a","numpy","array","."]
code: def parse_hf_data(
      hf_data: np.ndarray | pd.Categorical | pd.Series | pd.Index,
  ) -> np.ndarray | pd.Categorical:
      """Parse the high-frequency data to a numpy array."""
      # Categorical data (pandas)
      #   - pd.Series with categorical dtype -> calling .values will returns a
      #       pd.Categorical
      #   - pd.CategoricalIndex -> calling .values returns a pd.Categorical
      #   - pd.Categorical: has no .values attribute -> will not be parsed
      if isinstance(hf_data, pd.RangeIndex):
          return None
      if isinstance(hf_data, (pd.Series, pd.Index)):
          return hf_data.values
      return hf_data
  
file_path: plotly-resampler/plotly_resampler/aggregation/plotly_aggregator_parser.py
imports: from __future__ import annotations
  import bisect
  from typing import Tuple, Union
  import numpy
  import pandas
  import pytz
  from .aggregation_interface import DataAggregator, DataPointSelector
  from .gap_handler_interface import AbstractGapHandler
  from .gap_handlers import NoGapHandler
label_desc: Use image node_id 1 for calling the PlotlyAggregatorParser obj's underlying member method code with example usage: obj.parse_hf_data(hf_data) and returns: hf_data, None, hf_data