code: def logprob_join(op, values, axis, *base_rvs, **kwargs):
      """Compute the log-likelihood graph for a `Join`."""
      (value,) = values
  
      base_rv_shapes = [base_var.shape[axis] for base_var in base_rvs]
  
      # We don't need the graph to be constant, just to have RandomVariables removed
      base_rv_shapes = constant_fold(
          base_rv_shapes, raise_not_constant=False
      )
  
      split_values = pt.split(
          value,
          splits_size=base_rv_shapes,
          n_splits=len(base_rvs),
          axis=axis,
      )
  
      base_rvs_to_split_values = {
          base_rv: value
          for base_rv, value in zip(base_rvs, split_values)
      }
      logps = [
          _logprob_helper(base_var, split_value)
          for base_var, split_value in base_rvs_to_split_values.items()
      ]
  
      if len({logp.ndim for logp in logps}) != 1:
          raise ValueError(
              "Joined logps have different number of dimensions, this can happen when "
              "joining univariate and multivariate distributions",
          )
  
      # If the stacked variables depend on each other, we have to replace them by the respective values
      logps = replace_rvs_by_values(
          logps, rvs_to_values=base_rvs_to_split_values
      )
  
      base_vars_ndim_supp = split_values[0].ndim - logps[0].ndim
      join_logprob = pt.concatenate(
          [pt.atleast_1d(logp) for logp in logps],
          axis=axis - base_vars_ndim_supp,
      )
  
      return join_logprob
  
imports: from typing import List, Optional, Union
  import pytensor
  from pytensor import tensor
  from pytensor.graph.op import compute_test_value
  from pytensor.graph.rewriting.basic import node_rewriter
  from pytensor.tensor.basic import Alloc, Join, MakeVector
  from pytensor.tensor.elemwise import DimShuffle
  from pytensor.tensor.random.op import RandomVariable
  from pytensor.tensor.random.rewriting import local_dimshuffle_rv_lift, local_rv_size_lift
  from pymc.logprob.abstract import MeasurableVariable, _logprob, _logprob_helper
  from pymc.logprob.rewriting import PreserveRVMappings, assume_measured_ir_outputs, measurable_ir_rewrites_db
  from pymc.logprob.utils import check_potential_measurability, replace_rvs_by_values
  from pymc.pytensorf import constant_fold
label_desc: Use image node_id 3 for calling a global function with example usage: logprob_join(op, values, axis) and returns: join_logprob