code: def cdl_pattern(
      open_,
      high,
      low,
      close,
      name: Union[str, Sequence[str]] = "all",
      scalar=None,
      offset=None,
      **kwargs,
  ) -> DataFrame:
      """Candle Pattern"""
      # Validate Arguments
      open_ = verify_series(open_)
      high = verify_series(high)
      low = verify_series(low)
      close = verify_series(close)
      offset = get_offset(offset)
      scalar = float(scalar) if scalar else 100
  
      # Patterns that implemented in pandas-ta
      pta_patterns = {
          "doji": cdl_doji,
          "inside": cdl_inside,
      }
  
      if name == "all":
          name = ALL_PATTERNS
      if type(name) is str:
          name = [name]
  
      if Imports["talib"]:
          import talib.abstract as tala
  
      result = {}
      for n in name:
          if n not in ALL_PATTERNS:
              print(
                  f"[X] There is no candle pattern named {n} available!"
              )
              continue
  
          if n in pta_patterns:
              pattern_result = pta_patterns[n](
                  open_,
                  high,
                  low,
                  close,
                  offset=offset,
                  scalar=scalar,
                  **kwargs,
              )
              result[pattern_result.name] = pattern_result
          else:
              if not Imports["talib"]:
                  print(
                      f"[X] Please install TA-Lib to use {n}. (pip install TA-Lib)"
                  )
                  continue
  
              pattern_func = tala.Function(f"CDL{n.upper()}")
              pattern_result = Series(
                  pattern_func(open_, high, low, close, **kwargs)
                  / 100
                  * scalar
              )
              pattern_result.index = close.index
  
              # Offset
              if offset != 0:
                  pattern_result = pattern_result.shift(offset)
  
              # Handle fills
              if "fillna" in kwargs:
                  pattern_result.fillna(kwargs["fillna"], inplace=True)
              if "fill_method" in kwargs:
                  pattern_result.fillna(
                      method=kwargs["fill_method"], inplace=True
                  )
  
              result[f"CDL_{n.upper()}"] = pattern_result
  
      if len(result) == 0:
          return
  
      # Prepare DataFrame to return
      df = DataFrame(result)
      df.name = "CDL_PATTERN"
      df.category = "candles"
      return df
  
imports: from typing import Sequence, Union
  from pandas import Series, DataFrame
  from .None import cdl_doji, cdl_inside
  from pandas_ta.utils import get_offset, verify_series
  from pandas_ta import Imports
label_desc: Use image node_id 1 for calling a global function with example usage: cdl_pattern(open_, high, low, close, name, scalar, offset) and returns: df