code: def _prefix_scope(self, scope):
          
          if self.protocol_scope_prefix:
              if isinstance(scope, tuple):
                  return scope[0]
              elif scope.startswith(self.protocol_scope_prefix):
                  return scope
              else:
                  return '{}{}'.format(self.protocol_scope_prefix, scope)
          else:
              if isinstance(scope, tuple):
                  return scope[0]
              else:
                  return scope
docs: Inserts the protocol scope prefix if required