def _prefix_scope(self, scope):
if self.protocol_scope_prefix:<EOL><INDENT>if isinstance(scope, tuple):<EOL><INDENT>return scope[<NUM_LIT:0>]<EOL><DEDENT>elif scope.startswith(self.protocol_scope_prefix):<EOL><INDENT>return scope<EOL><DEDENT>else:<EOL><INDENT>return '<STR_LIT>'.format(self.protocol_scope_prefix, scope)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if isinstance(scope, tuple):<EOL><INDENT>return scope[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>return scope<EOL><DEDENT><DEDENT>
Inserts the protocol scope prefix if required