code: def _linear_normalization_from_0to1(
      data,
      mask,
      theoretical_max,
      theoretical_min=0,
      message="normalizing equalized data to fit in 0 to 1 range",
  ):
      """Do a linear normalization so all data is in the 0 to 1 range.
  
      This is a sloppy but fast calculation that relies on parameters giving it
      the correct theoretical current max and min so it can scale the data
      accordingly.
      """
      LOG.debug(message)
      if theoretical_min != 0:
          data[mask] = data[mask] - theoretical_min
          theoretical_max = theoretical_max - theoretical_min
      data[mask] = data[mask] / theoretical_max
  
imports: from __future__ import annotations
  import logging
  import math
  from datetime import datetime
  import dask
  import dask.array
  import numpy
  import xarray
  from satpy.composites import CompositeBase, GenericCompositor
  from satpy.dataset import combine_metadata
label_desc: Use image node_id 10 for calling a global function with example usage: _linear_normalization_from_0to1(data, mask, theoretical_max, theoretical_min, message) without return types