code: def _dropout_returns_masked_input_and_mask(
      g: jit_utils.GraphContext,
      input: torch._C.Value,
      p: float,
      train: bool,
  ) -> Tuple[torch._C.Value, Optional[torch._C.Value]]:
      symbolic_helper.check_training_mode(train, "dropout")
      # In eval mode, dropout is non-op. That is, if the node's
      # train param is set to False, dropout just returns its inputs.
      if not train:
          return input, None
      p = g.op("Constant", value_t=torch.tensor(p))
      t = g.op(
          "Constant", value_t=torch.tensor(train, dtype=torch.bool)
      )
      r, mask = g.op("Dropout", input, p, t, outputs=2)
      return r, mask
  
imports: from __future__ import annotations
  import functools
  import sys
  from typing import Optional, Tuple
  import torch
  from torch._C import _onnx
  from torch.onnx import _type_utils, errors, symbolic_helper, symbolic_opset9, utils
  from torch.onnx._internal import _beartype, jit_utils, registration
label_desc: Use image node_id 4 for calling a global function with example usage: _dropout_returns_masked_input_and_mask(g, input, p, train) and returns: r,  mask, input,  None