"""Util for protocols.""" from ddtrace import tracer @tracer.wrap() def validate_protocol(module): """Validate protocol module. This method checks that the module contains all the required methods before we allow a service to use it. If one of the method is missing, an exception is thrown. """ for method in ('delete', 'get', 'head', 'put', 'patch'): getattr(module, method)