code: def _extract_byte_mask(
      dataset, byte_information, bit_start, bit_count
  ):
      attrs = dataset.attrs.copy()
  
      if isinstance(byte_information, int):
          # Only one byte: select the byte information
          byte_dataset = dataset[byte_information, :, :]
          dataset = _bits_strip(bit_start, bit_count, byte_dataset)
      elif (
          isinstance(byte_information, (list, tuple))
          and len(byte_information) == 2
      ):
          # Two bytes: recombine the two bytes
          byte_mask = da.map_blocks(
              _extract_two_byte_mask,
              dataset.data[byte_information[0]],
              dataset.data[byte_information[1]],
              bit_start=bit_start,
              bit_count=bit_count,
              dtype=np.uint16,
              meta=np.array((), dtype=np.uint16),
              chunks=tuple(
                  tuple(chunk_size * 4 for chunk_size in dim_chunks)
                  for dim_chunks in dataset.chunks[1:]
              ),
          )
          dataset = xr.DataArray(byte_mask, dims=dataset.dims[1:])
  
      # Compute the final bit mask
      dataset.attrs = attrs
      return dataset
  
imports: import logging
  import dask.array
  import numpy
  import xarray
  from satpy.readers.hdf4_utils import from_sds
  from satpy.readers.hdfeos_base import HDFEOSGeoReader
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_byte_mask(dataset, byte_information, bit_start, bit_count) and returns: dataset