code: def get_width_and_height_from_size(x):
      """Obtain height and width from x.
  
      Args:
          x (int, tuple or list): Data size.
  
      Returns:
          size: A tuple or list (H,W).
      """
      if isinstance(x, int):
          return x, x
      if isinstance(x, list) or isinstance(x, tuple):
          return x
      else:
          raise TypeError()
  
imports: import re
  import math
  import collections
  from functools import partial
  import torch
  from torch import nn
  from torch.nn import functional
  from torch.utils import model_zoo
label_desc: Use image node_id 4 for calling a global function with example usage: get_width_and_height_from_size(x) and returns: x,  x, x