code: def z_where_inv(z_where):
      # Take a batch of z_where vectors, and compute their "inverse".
      # That is, for each row compute:
      # [s,x,y] -> [1/s,-x/s,-y/s]
      # These are the parameters required to perform the inverse of the
      # spatial transform performed in the generative model.
      n = z_where.size(0)
      out = torch.cat((z_where.new_ones(n, 1), -z_where[:, 1:]), 1)
      # Divide all entries by the scale.
      out = out / z_where[:, 0:1]
      return out
  
imports: from collections import namedtuple
  import torch
  import torch.nn
  import torch.nn.functional
  from modules import MLP, Decoder, Encoder, Identity, Predict
  import pyro
  import pyro.distributions
label_desc: Use image node_id 3 for calling a global function with example usage: z_where_inv(z_where) and returns: out