code: def fluss(I, L, n_regimes, excl_factor=5, custom_iac=None):
      """
      Compute the Fast Low-cost Unipotent Semantic Segmentation (FLUSS)
      for static data (i.e., batch processing)
  
      Essentially, this is a wrapper to compute the corrected arc curve and
      regime locations. Note that since the matrix profile indices, `I`, are pre-computed,
      this function is agnostic to subsequence normalization.
  
      Parameters
      ----------
      I : numpy.ndarray
          The matrix profile indices for the time series of interest
  
      L : int
          The subsequence length that is set roughly to be one period length.
          This is likely to be the same value as the window size, `m`, used
          to compute the matrix profile and matrix profile index but it can
          be different since this is only used to manage edge effects
          and has no bearing on any of the IAC or CAC core calculations.
  
      n_regimes : int
          The number of regimes to search for. This is one more than the
          number of regime changes as denoted in the original paper.
  
      excl_factor : int, default 5
          The multiplying factor for the regime exclusion zone
  
      custom_iac : numpy.ndarray, default None
          A custom idealized arc curve (IAC) that will used for correcting the
          arc curve
  
      Returns
      -------
      cac : numpy.ndarray
          A corrected arc curve (CAC)
  
      regime_locs : numpy.ndarray
          The locations of the regimes
  
      See Also
      --------
      stumpy.floss : Compute the Fast Low-Cost Online Semantic Segmentation (FLOSS) for
          streaming data
  
      Notes
      -----
      `DOI: 10.1109/ICDM.2017.21 <https://www.cs.ucr.edu/~eamonn/Segmentation_ICDM.pdf>`__
  
      See Section A
  
      This is the implementation for Fast Low-cost Unipotent Semantic
      Segmentation (FLUSS).
  
      Examples
      --------
      >>> import stumpy
      >>> import numpy as np
      >>> mp = stumpy.stump(np.array([584., -11., 23., 79., 1001., 0., -19.]), m=3)
      >>> stumpy.fluss(mp[:, 0], 3, 2)
      (array([1., 1., 1., 1., 1.]), array([0]))
      """
      cac = _cac(
          I,
          L,
          bidirectional=True,
          excl_factor=excl_factor,
          custom_iac=custom_iac,
      )
      regime_locs = _rea(cac, n_regimes, L, excl_factor=excl_factor)
  
      return cac, regime_locs
  
file_path: stumpy/stumpy/floss.py
imports: import copy
  import numpy
  import scipy.stats
  from .None import config, core
label_desc: Use image node_id 5 for calling a global function with example usage: fluss(I, L, n_regimes, excl_factor, custom_iac) and returns: cac,  regime_locs