code: def variance(
      close, length=None, ddof=None, talib=None, offset=None, **kwargs
  ):
      """Indicator: Variance"""
      # Validate Arguments
      length = int(length) if length and length > 1 else 30
      ddof = (
          int(ddof)
          if isinstance(ddof, int) and ddof >= 0 and ddof < length
          else 1
      )
      min_periods = (
          int(kwargs["min_periods"])
          if "min_periods" in kwargs
          and kwargs["min_periods"] is not None
          else length
      )
      close = verify_series(close, max(length, min_periods))
      offset = get_offset(offset)
      mode_tal = bool(talib) if isinstance(talib, bool) else True
  
      if close is None:
          return
  
      # Calculate Result
      if Imports["talib"] and mode_tal:
          from talib import VAR
  
          variance = VAR(close, length)
      else:
          variance = close.rolling(length, min_periods=min_periods).var(
              ddof
          )
  
      # Offset
      if offset != 0:
          variance = variance.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          variance.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          variance.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name & Category
      variance.name = f"VAR_{length}"
      variance.category = "statistics"
  
      return variance
  
label_desc: Use image node_id 1 for calling a global function with example usage: variance(close, length, ddof, talib, offset) and returns: variance