code: def l2_lfl_schema(settings=None):
      """Define schema for LI L2 LFL product."""
      settings = settings or {}
  
      nobs = settings.get("num_obs", 1234)
      epoch = datetime(2000, 1, 1)
      stime = (datetime(2019, 1, 1) - epoch).total_seconds()
      etime = (datetime(2019, 1, 2) - epoch).total_seconds()
  
      return {
          "providers": settings.get("providers", {}),
          "variable_path": settings.get("variable_path", ""),
          "dimensions": {
              "flashes": nobs,
          },
          "variables": {
              "latitude": {
                  "format": "i2",
                  "shape": ("flashes",),
                  "long_name": "Latitude of Flash",
                  "standard_name": "latitude",
                  "units": "degrees_north",
                  "add_offset": 0.0,
                  "scale_factor": 0.0027,
                  # Note: using a default range of [-88.3deg, 88.3deg] to stay in
                  # the available type range [-32727,32727] with scaling:
                  "default_data": lambda: np.linspace(
                      -88.3 / 0.0027, 88.3 / 0.0027, nobs
                  ),
              },
              "longitude": {
                  "format": "i2",
                  "shape": ("flashes",),
                  "long_name": "Longitude of Flash",
                  "standard_name": "longitude",
                  "units": "degrees_east",
                  "add_offset": 0.0,
                  "scale_factor": 0.0027,
                  # Note: using a default range of [-88.3deg, 88.3deg] to stay in
                  # the available type range [-32727,32727] with scaling:
                  "default_data": lambda: np.linspace(
                      -88.3 / 0.0027, 88.3 / 0.0027, nobs
                  ),
              },
              "radiance": {
                  "format": "u2",
                  "shape": ("flashes",),
                  "long_name": "Radiance of Flash",
                  "standard_name": "radiance",
                  "units": "mW.m-2.sr-1",
                  "default_data": lambda: np.round(
                      np.random.normal(500, 100, nobs)
                  ),
              },
              "flash_duration": {
                  "format": "u2",
                  "shape": ("flashes",),
                  "long_name": "Flash duration",
                  "standard_name": "flash_duration",
                  "units": "ms",
                  "default_data": lambda: np.linspace(0, 1000, nobs),
              },
              "flash_filter_confidence": {
                  "format": "i1",
                  "shape": ("flashes",),
                  "long_name": "L2 filtered flash confidence",
                  "standard_name": "flash_filter_confidence",
                  "default_data": lambda: np.clip(
                      np.round(np.random.normal(20, 10, nobs)),
                      1,
                      2**7 - 1,
                  ),
              },
              "flash_footprint": {
                  "format": "u2",
                  "shape": ("flashes",),
                  "long_name": "Flash footprint size",
                  "standard_name": "flash_footprint",
                  "units": "L1 grid pixels",
                  "default_data": lambda: np.maximum(
                      1, np.round(np.random.normal(5, 3, nobs))
                  ),
              },
              "flash_id": {
                  "format": "u4",
                  "shape": ("flashes",),
                  "long_name": "Flash footprint size",
                  "standard_name": "flash_id",
                  "default_data": lambda: np.arange(1, nobs + 1),
              },
              "flash_time": {
                  "format": "f8",
                  "shape": ("flashes",),
                  "long_name": "Nominal flash time",
                  "units": "seconds since 2000-01-01 00:00:00.0",
                  "standard_name": "time",
                  "precision": "1 millisecond",
                  "default_data": lambda: np.random.uniform(
                      stime, etime, nobs
                  ),
              },
              "l1b_geolocation_warning": {
                  "format": "i1",
                  "shape": ("flashes",),
                  "long_name": "L1b geolocation warning",
                  "default_data": lambda: -127,
              },
              "l1b_radiometric_warning": {
                  "format": "i1",
                  "shape": ("flashes",),
                  "long_name": "L1b radiometric warning",
                  "default_data": lambda: -127,
              },
              "number_of_events": {
                  "format": "u2",
                  "shape": ("flashes",),
                  "long_name": "Number of events in each flash",
                  "default_data": lambda: 1,
              },
              "number_of_groups": {
                  "format": "u4",
                  "shape": ("flashes",),
                  "long_name": "Number of flashes in each flash",
                  "default_data": lambda: 1,
              },
          },
      }
  
imports: from datetime import datetime
  import numpy
  import xarray
  from satpy.tests.reader_tests.test_netcdf_utils import FakeNetCDF4FileHandler
label_desc: Use image node_id 4 for calling a global function with example usage: l2_lfl_schema(settings) and returns: dict