code: def get_frequency(
      freq, data_frequency=None, supported_freqs=["D", "H", "T"]
  ):
      """
      Takes an arbitrary candle size (e.g. 15T) and converts to the lowest
      common denominator supported by the data bundles (e.g. 1T). The data
      bundles only support 1T and 1D frequencies. If another frequency
      is requested, Catalyst must request the underlying data and resample.
  
      Notes
      -----
      We're trying to use Pandas convention for frequency aliases.
  
      Parameters
      ----------
      freq: str
      data_frequency: str
  
      Returns
      -------
      str, int, str, str
  
      """
      if data_frequency is None:
          data_frequency = (
              "daily" if freq.upper().endswith("D") else "minute"
          )
  
      if freq == "minute":
          unit = "T"
          candle_size = 1
  
      elif freq == "daily":
          unit = "D"
          candle_size = 1
  
      else:
          freq_match = re.match(
              r"([0-9].*)?(m|M|d|D|h|H|T)", freq, re.M | re.I
          )
          if freq_match:
              candle_size = (
                  int(freq_match.group(1)) if freq_match.group(1) else 1
              )
              unit = freq_match.group(2)
  
          else:
              raise InvalidHistoryFrequencyError(frequency=freq)
  
      # TODO: some exchanges support H and W frequencies but not bundles
      # Find a way to pass-through these parameters to exchanges
      # but resample from minute or daily in backtest mode
      # see catalyst/exchange/ccxt/ccxt_exchange.py:242 for mapping between
      # Pandas offet aliases (used by Catalyst) and the CCXT timeframes
      if unit.lower() == "d":
          unit = "D"
          alias = "{}D".format(candle_size)
  
          if data_frequency == "minute":
              data_frequency = "daily"
  
      elif unit.lower() == "m" or unit == "T":
          unit = "T"
          alias = "{}T".format(candle_size)
          data_frequency = "minute"
  
      elif unit.lower() == "h":
          data_frequency = "minute"
  
          if "H" in supported_freqs:
              unit = "H"
              alias = "{}H".format(candle_size)
          else:
              candle_size = candle_size * 60
              alias = "{}T".format(candle_size)
  
      else:
          raise InvalidHistoryFrequencyAlias(freq=freq)
  
      return alias, candle_size, unit, data_frequency
  
file_path: catalyst/catalyst/exchange/utils/datetime_utils.py
imports: import calendar
  import math
  import re
  from datetime import datetime, timedelta, date
  import pandas
  import pytz
  from catalyst.exchange.exchange_errors import InvalidHistoryFrequencyError, InvalidHistoryFrequencyAlias
label_desc: Use image node_id 10 for calling a global function with example usage: get_frequency(freq, data_frequency, supported_freqs) and returns: alias,  candle_size,  unit,  data_frequency