async def METHOD_NAME(
    command: SensorRun,
    driver: AbstractCanDriver,
    node_id: NodeId,
    include_csv: bool,
    log: logging.Logger,
) -> None:
    """Function to read data from the capacitive sensor."""
    start_time = datetime.now()
    csv = None
    capacitive = sensor_types.CapacitiveSensor.build(SensorId.S0, node_id)
    s_driver = sensor_driver.SensorDriver()
    messenger = CanMessenger(driver=driver)
    messenger.start()
    if include_csv:
        metadata = CSVMetaData(
            command.serial_number,
            command.sensor_type.name,
            command.minutes,
            command.auto_zero,
            start_time.strftime(hms),
        )
        csv = CSVFormatter.build(metadata, list(metadata.to_dict().keys()))
    # autozero
    await s_driver.get_baseline(messenger, capacitive, 10, timeout=10)
    end_time = start_time + timedelta(minutes=command.minutes)
    while datetime.now() < end_time:
        data = await s_driver.read(messenger, capacitive, offset=False, timeout=10)
        curr_time = datetime.now().strftime(hms)
        if isinstance(data, SensorDataType):
            log.info(f"Capacitive data: {data.to_float()} at: {curr_time}")
            if csv:
                csv.write_dict({"time": curr_time, "data": data.to_float()})
        else:
            log.info(f"Capacitive data not found at: {curr_time}")
    end_time_log = datetime.now().strftime(hms)
    text_end_time = f"Test ended at: {end_time_log}"
    log.info(text_end_time)
    if csv:
        csv.write(text_end_time)
    await messenger.stop()