code: def forward(self, img1, img2, flow, valid_flow_mask):
      img1 = F.pil_to_tensor(img1)
      img2 = F.pil_to_tensor(img2)
      if flow is not None:
          flow = torch.from_numpy(flow)
      if valid_flow_mask is not None:
          valid_flow_mask = torch.from_numpy(valid_flow_mask)
  
      return img1, img2, flow, valid_flow_mask
  
imports: import torch
  import torchvision.transforms
  import torchvision.transforms.functional
label_desc: Use image node_id 1 for calling the PILToTensor obj's underlying member method code with example usage: obj.forward(img1, img2, flow, valid_flow_mask) and returns: img1,  img2,  flow,  valid_flow_mask