code: def available_for_protocol(self, protocol):
          
          if self.protocol == ALL or protocol == ALL:
              return True
  
          return protocol in ensure_sequence(self.protocol)
docs: Check if the current function can be executed from a request defining the given protocol