def __init__(
        self,
        gate_name: str,
        gate_module: str,
        num_qubits: int = 1,
        custom_args: Mapping[str, program_pb2.CustomArg] | None = None,
        **kwargs,
    ):
        """Instatiates an InternalGate.

        Arguments:
            gate_name: Gate class name.
            gate_module: The module of the gate.
            num_qubits: Number of qubits that the gate acts on.
            custom_args: A mapping from argument name to `CustomArg`.
                This is to support argument that require special processing.
            **kwargs: The named arguments to be passed to the gate constructor.
        """
        self.gate_module = gate_module
        self.gate_name = gate_name
        self._num_qubits = num_qubits
        self.gate_args = kwargs
        self.custom_args = custom_args or {}
Instatiates an InternalGate.

        Arguments:
            gate_name: Gate class name.
            gate_module: The module of the gate.
            num_qubits: Number of qubits that the gate acts on.
            custom_args: A mapping from argument name to `CustomArg`.
                This is to support argument that require special processing.
            **kwargs: The named arguments to be passed to the gate constructor.
        
cirq-google/cirq_google/ops/internal_gate.py