code: def expand_masks(mask, padding):
      # type: (Tensor, int) -> Tuple[Tensor, float]
      M = mask.shape[-1]
      if (
          torch._C._get_tracing_state()
      ):  # could not import is_tracing(), not sure why
          scale = expand_masks_tracing_scale(M, padding)
      else:
          scale = float(M + 2 * padding) / M
      padded_mask = F.pad(mask, (padding,) * 4)
      return padded_mask, scale
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  import torchvision
  from torch import nn, Tensor
  from torchvision.ops import boxes, roi_align
  from .None import _utils
label_desc: Use image node_id 14 for calling a global function with example usage: expand_masks(mask, padding) and returns: padded_mask,  scale