code: def _infer_scale(feature: Tensor, original_size: List[int]) -> float:
      # assumption: the scale is of the form 2 ** (-k), with k integer
      size = feature.shape[-2:]
      possible_scales: List[float] = []
      for s1, s2 in zip(size, original_size):
          approx_scale = float(s1) / float(s2)
          scale = 2 ** float(torch.tensor(approx_scale).log2().round())
          possible_scales.append(scale)
      return possible_scales[0]
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.fx
  import torchvision
  from torch import nn, Tensor
  from torchvision.ops.boxes import box_area
  from ..utils import _log_api_usage_once
  from .roi_align import roi_align
label_desc: Use image node_id 4 for calling a global function with example usage: _infer_scale(feature, original_size) and returns: possible_scales