code: def _create_bad_quality_lines_mask(
      line_validity, line_geometric_quality, line_radiometric_quality
  ):
      """Create bad quality scan lines mask.
  
      For details on quality flags see `MSG Level 1.5 Image Data Format Description`_
      page 109.
  
      Args:
          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:
          numpy.ndarray: Indicating if the scan line is bad.
      """
      # Based on missing (2) or corrupted (3) data
      line_mask = line_validity >= 2
      line_mask &= line_validity <= 3
      # Do not use (4)
      line_mask &= line_radiometric_quality == 4
      line_mask &= line_geometric_quality == 4
      return line_mask
  
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 14 for calling a global function with example usage: _create_bad_quality_lines_mask(line_validity, line_geometric_quality, line_radiometric_quality) and returns: line_mask