code: def freq(data: TypeSeriesFrame) -> Optional[str]:
      """
      Args:
          data (Union[pd.Series, pd.DataFrame]): Time series.
  
      Returns:
          int: Data's inferred frequency.
      """
      return str(data.index.sort_values().inferred_freq)
  
file_path: tslumen/tslumen/profile/summary.py
imports: from typing import Any, Optional
  import numpy
  import pandas
  from statsmodels.tsa.tsatools import freq_to_period
  from tslumen.profile.base import ProfilingFunction, TypeSeriesFrame
label_desc: Use image node_id 5 for calling a global function with example usage: freq(data) and returns: str