code: def generate_minutes_calendar_from_daily(
      calendars: Iterable,
      freq: str = "1min",
      am_range: Tuple[str, str] = ("09:30:00", "11:29:00"),
      pm_range: Tuple[str, str] = ("13:00:00", "14:59:00"),
  ) -> pd.Index:
      """generate minutes calendar
  
      Parameters
      ----------
      calendars: Iterable
          daily calendar
      freq: str
          by default 1min
      am_range: Tuple[str, str]
          AM Time Range, by default China-Stock: ("09:30:00", "11:29:00")
      pm_range: Tuple[str, str]
          PM Time Range, by default China-Stock: ("13:00:00", "14:59:00")
  
      """
      daily_format: str = "%Y-%m-%d"
      res = []
      for _day in calendars:
          for _range in [am_range, pm_range]:
              res.append(
                  pd.date_range(
                      f"{pd.Timestamp(_day).strftime(daily_format)} {_range[0]}",
                      f"{pd.Timestamp(_day).strftime(daily_format)} {_range[1]}",
                      freq=freq,
                  )
              )
  
      return pd.Index(sorted(set(np.hstack(res))))
  
imports: import re
  import copy
  import importlib
  import time
  import bisect
  import pickle
  import random
  import requests
  import functools
  from pathlib import Path
  from typing import Iterable, Tuple, List
  import numpy
  import pandas
  from lxml import etree
  from loguru import logger
  from yahooquery import Ticker
  from tqdm import tqdm
  from functools import partial
  from concurrent.futures import ProcessPoolExecutor
  from bs4 import BeautifulSoup
label_desc: Use image node_id 13 for calling a global function with example usage: generate_minutes_calendar_from_daily(calendars, freq, am_range, pm_range) and returns: pd