code: def dropout(
      x: torch.Tensor,
      prob: float,
      /,
      *,
      scale: bool = True,
      dtype: torch.dtype = None,
      training: bool = True,
      seed: Optional[int] = None,
      noise_shape: Optional[Sequence[int]] = None,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      x = ivy.astype(x, dtype) if dtype and x.dtype != dtype else x
      if prob == 0 or not training:
          return x
      res = torch.nn.functional.dropout(x, prob, training=True)
      res = torch.multiply(res, (1.0 - prob)) if not scale else res
      return res
  
imports: from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
  import torch
  import math
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
  from ivy.functional.ivy.layers import _handle_padding, _get_num_padded_values, _validate_max_pool_params, _depth_max_pooling_helper
  from ivy.functional.ivy.experimental.layers import _padding_ceil_mode, _broadcast_pooling_helper
label_desc: Use image node_id 14 for calling a global function with example usage: dropout() and returns: res, x