docstr: Get the closest freq to base_freq from freq_list
  
  Parameters
  ----------
  base_freq
  freq_list
  
  Returns
  -------
  if the recent frequency is found
      Freq
  else:
      None
docstr_tok: ["Get","the","closest","freq","to","base_freq","from","freq_list","Parameters","--","--","--","--","--","base_freq","freq_list","Returns","--","--","--","-","if","the","recent","frequency","is","found","Freq","else",":","None"]
code: def get_recent_freq(
      base_freq: Union[str, "Freq"], freq_list: List[Union[str, "Freq"]]
  ) -> Optional["Freq"]:
      """Get the closest freq to base_freq from freq_list
  
      Parameters
      ----------
      base_freq
      freq_list
  
      Returns
      -------
      if the recent frequency is found
          Freq
      else:
          None
      """
      base_freq = Freq(base_freq)
      # use the nearest freq greater than 0
      min_freq = None
      for _freq in freq_list:
          _min_delta = Freq.get_min_delta(base_freq, _freq)
          if _min_delta < 0:
              continue
          if min_freq is None:
              min_freq = (_min_delta, str(_freq))
              continue
          min_freq = (
              min_freq
              if min_freq[0] <= _min_delta
              else (_min_delta, _freq)
          )
      return min_freq[1] if min_freq else None
  
imports: import bisect
  from datetime import datetime, time, date, timedelta
  from typing import List, Optional, Tuple, Union
  import functools
  import re
  import pandas
  from qlib.config import C
  from qlib.constant import REG_CN, REG_TW, REG_US
label_desc: Use image node_id 8 for calling the Freq obj's underlying member method code with example usage: obj.get_recent_freq(base_freq, freq_list) and returns: unknown