code: def dsrec(capfd):
      """GDAL's open dataset records as a pytest fixture"""
  
      def func(env):
          """Get records of GDAL's open datasets
  
          Parameters
          ----------
          env : Env
              A rasterio environment.
  
          Returns
          -------
          list of str
              Each string record represents an open dataset and tells the
              filename, the driver used to open the dataset, the reference
              count, and other information.
  
          """
          env._dump_open_datasets()
          captured = capfd.readouterr()
          records = captured.err.strip("\n").split("\n")[1:]
          return records
  
      return func
  
imports: from __future__ import division
  import logging
  import shutil
  import affine
  import numpy
  import pytest
  import rasterio
  from rasterio.control import GroundControlPoint
  from rasterio.crs import CRS
  from rasterio.enums import Resampling, MaskFlags
  from rasterio.errors import WarpOptionsError
  from rasterio.io import MemoryFile
  from rasterio import shutil
  from rasterio.vrt import WarpedVRT
  from rasterio.warp import transform_bounds
  from rasterio.windows import Window
  from .conftest import gdal_version, credentials
label_desc: Use image node_id 33 for calling a global function with example usage: dsrec(capfd) and returns: func, records