def __init__(
        self,
        node,
        type_codename,
        parameter_name,
        subparameter_index=None,
        center=(0, 0),
    ):
        """Store arguments, setup image, rect and position.

        Parameters
        ==========

        node (graphman.calnode.main.CallableNode reference)
            node to which this socket belongs
        type_codename (string)
            a name representing an specific type, used
            to pick style-related objects for the socket;
            no type enforcing is ever performed, though.
        parameter_name (string)
            represents the name of the parameter
        subparameter_index (None or integer >= 0)
            if given, it is a string which represents the
            name of the subparameter; we use stringified
            integers which are generated automatically
            whenenver a new subparameter is created.
        center (2-tuple of integers)
            represents the position on the screen wherein
            to center the input socket.
        """
        ### store arguments

        ## node instance
        self.node = node

        ## store parameter name and subparameter index

        self.parameter_name = parameter_name
        self.subparameter_index = subparameter_index

        ## store type codename and perform related setups
        self.update_type_codename(type_codename)

        ### obtain rect from image and position it using
        ### the given center

        self.rect = self.image.get_rect()
        setattr(self.rect, "center", center)
Store arguments, setup image, rect and position.

        Parameters
        ==========

        node (graphman.calnode.main.CallableNode reference)
            node to which this socket belongs
        type_codename (string)
            a name representing an specific type, used
            to pick style-related objects for the socket;
            no type enforcing is ever performed, though.
        parameter_name (string)
            represents the name of the parameter
        subparameter_index (None or integer >= 0)
            if given, it is a string which represents the
            name of the subparameter; we use stringified
            integers which are generated automatically
            whenenver a new subparameter is created.
        center (2-tuple of integers)
            represents the position on the screen wherein
            to center the input socket.
        
nodezator/graphman/socket/input.py