code: def _logp_forw(point, out_vars, in_vars, shared):
      """Compile PyTensor function of the model and the input and output variables.
  
      Parameters
      ----------
      out_vars : list
          Containing Distribution for the output variables
      in_vars : list
          Containing Distribution for the input variables
      shared : list
          Containing TensorVariable for depended shared data
      """
  
      # Replace integer inputs with rounded float inputs
      if any(var.dtype in discrete_types for var in in_vars):
          replace_int_input = {}
          new_in_vars = []
          for in_var in in_vars:
              if in_var.dtype in discrete_types:
                  float_var = pt.TensorType(
                      "floatX", in_var.type.shape
                  )(in_var.name)
                  new_in_vars.append(float_var)
                  replace_int_input[in_var] = pt.round(
                      float_var
                  ).astype(in_var.dtype)
              else:
                  new_in_vars.append(in_var)
  
          out_vars = clone_replace(
              out_vars, replace_int_input, rebuild_strict=False
          )
          in_vars = new_in_vars
  
      out_list, inarray0 = join_nonshared_inputs(
          point=point,
          outputs=out_vars,
          inputs=in_vars,
          shared_inputs=shared,
      )
      f = compile_pymc([inarray0], out_list[0])
      f.trust_input = True
      return f
  
imports: import abc
  import sys
  import warnings
  from abc import ABC
  from typing import Dict, Union, cast
  import numpy
  import pytensor.tensor
  from pytensor.graph.replace import clone_replace
  from scipy.special import logsumexp
  from scipy.stats import multivariate_normal
  from typing_extensions import TypeAlias
  from pymc.backends.ndarray import NDArray
  from pymc.blocking import DictToArrayBijection
  from pymc.initial_point import make_initial_point_expression
  from pymc.model import Point, modelcontext
  from pymc.pytensorf import compile_pymc, floatX, join_nonshared_inputs, make_shared_replacements
  from pymc.sampling.forward import draw
  from pymc.step_methods.metropolis import MultivariateNormalProposal
  from pymc.vartypes import discrete_types
label_desc: Use image node_id 2 for calling a global function with example usage: _logp_forw(point, out_vars, in_vars, shared) and returns: f