def handle_signature()

in src/ext/guac.py [0:0]


    def handle_signature(self, sig, signode):

        # This function is inherited from the superclass (ObjectDescription).
        # The implementation is expected to override this function to define
        # the unique signature and name for the object being documented.

        signode.clear()
        signode += addnodes.desc_name(sig, sig)

        # Generate an internal, unique name for referring to this instruction
        # based on how the instruction is actually used (there may be multiple
        # definitions having the same instruction opcode yet different meanings
        # if sent by client vs. server or during the handshake vs. interactive
        # phases)
        unique_name = sig

        # Add "client-" prefix for all client-specific instructions
        if self.get_senders() == { 'client' }:
            unique_name = 'client-' + unique_name

        # Add "-handshake" suffix for all handshake-specific instructions
        if self.get_phases() == { 'handshake' }:
            unique_name += '-handshake'

        # NOTE: This value will be passed as the name to add_target_and_index()
        return unique_name