def METHOD_NAME(func, instance, args, kwargs):
    record = func(*args, **kwargs)
    if record:
        bootstrap_servers = (
            KafkaPropertiesExtractor.extract_bootstrap_servers(instance)
        )
        extracted_context = propagate.extract(
            record.headers, getter=_kafka_getter
        )
        _create_consumer_span(
            tracer,
            consume_hook,
            record,
            extracted_context,
            bootstrap_servers,
            args,
            kwargs,
        )
    return record