code: def mask_bad_quality(
      data,
      line_validity,
      line_geometric_quality,
      line_radiometric_quality,
  ):
      """Mask scan lines with bad quality.
  
      Args:
          data (xarray.DataArray):
              Channel data
          line_validity (numpy.ndarray):
              Quality flags with shape (nlines,).
          line_geometric_quality (numpy.ndarray):
              Quality flags with shape (nlines,).
          line_radiometric_quality (numpy.ndarray):
              Quality flags with shape (nlines,).
  
      Returns:
          xarray.DataArray: data with lines flagged as bad converted to np.nan.
      """
      line_mask = _create_bad_quality_lines_mask(
          line_validity,
          line_geometric_quality,
          line_radiometric_quality,
      )
      line_mask = line_mask[:, np.newaxis]
      data = data.where(~line_mask, np.nan).astype(np.float32)
      return data
  
imports: from __future__ import annotations
  import warnings
  from datetime import datetime, timedelta
  import dask.array
  import numpy
  import pyproj
  from numpy.polynomial.chebyshev import Chebyshev
  from satpy.readers.eum_base import issue_revision, time_cds_short
  from satpy.readers.utils import apply_earthsun_distance_correction
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 15 for calling a global function with example usage: mask_bad_quality(data, line_validity, line_geometric_quality, line_radiometric_quality) and returns: data