docs: def boundless_vrt_doc(
          src_dataset, nodata=None, background=None, hidenodata=False,
          width=None, height=None, transform=None, bands=None):
      """Make a VRT XML document.
      Parameters
      ----------
      src_dataset : Dataset
          The dataset to wrap.
      background : Dataset, optional
          A dataset that provides the optional VRT background. NB: this dataset
          must have the same number of bands as the src_dataset.
      Returns
      -------
      bytes
          An ascii-encoded string (an ElementTree detail)
      """
  
      nodata = nodata or src_dataset.nodata
      width = width or src_dataset.width
      height = height or src_dataset.height
      transform = transform or src_dataset.transform
  
      vrt = BaseVRT(width, height, src_dataset.crs, transform)
  
      bidxs = src_dataset.indexes if bands is None else bands
      for bidx in bidxs:
          ci = src_dataset.colorinterp[bidx - 1]
          block_shape = src_dataset.block_shapes[bidx - 1]
          dtype = src_dataset.dtypes[bidx - 1]
  
          band_element = vrt.add_band(dtype, bidx, ci.name, nodata=nodata, hidenodata=True)
  
          if background is not None:
              src_window = Window(0, 0, background.width, background.height)
              dst_window = Window(0, 0, width, height)
              vrt.add_band_simplesource(band_element, bidx, dtype, False, background.name,
                                        width, height, block_shape[1], block_shape[0],
                                        src_window, dst_window)
  
          src_window = Window(0, 0, src_dataset.width, src_dataset.height)
          xoff = (src_dataset.transform.xoff - transform.xoff) / transform.a
          yoff = (src_dataset.transform.yoff - transform.yoff) / transform.e
          xsize = src_dataset.width * src_dataset.transform.a / transform.a
          ysize = src_dataset.height * src_dataset.transform.e / transform.e
          dst_window = Window(xoff, yoff, xsize, ysize)
          vrt.add_band_simplesource(band_element, bidx, dtype, False, src_dataset.name,
                                    width, height, block_shape[1], block_shape[0],
                                    src_window, dst_window, nodata=src_dataset.nodata)
  
      if all(MaskFlags.per_dataset in flags for flags in src_dataset.mask_flag_enums):
          mask_band = vrt.add_mask_band('Byte')
          src_window = Window(0, 0, src_dataset.width, src_dataset.height)
          xoff = (src_dataset.transform.xoff - transform.xoff) / transform.a
          yoff = (src_dataset.transform.yoff - transform.yoff) / transform.e
          xsize = src_dataset.width
          ysize = src_dataset.height
          dst_window = Window(xoff, yoff, xsize, ysize)
          vrt.add_band_simplesource(mask_band, 'mask,1', 'Byte', False, src_dataset.name,
                                    width, height, block_shape[1], block_shape[0], src_window, dst_window)
      return vrt