code: def test_remote_pipe_closed():
      master_pid = os.getpid()
      with pm.Model():
          x = pm.Normal("x", shape=2, mu=0.1)
          at_pid = pt.as_tensor_variable(
              np.array(master_pid, dtype="int32")
          )
          pm.Normal("y", mu=_crash_remote_process(x, at_pid), shape=2)
  
          step = pm.Metropolis()
          with pytest.raises(
              ps.ParallelSamplingError, match="Chain [0-9] failed with"
          ) as ex:
              pm.sample(
                  step=step,
                  mp_ctx="spawn",
                  tune=2,
                  draws=2,
                  cores=2,
                  chains=2,
              )
  
imports: import multiprocessing
  import os
  import platform
  import sys
  import warnings
  import cloudpickle
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from pytensor.compile.ops import as_op
  from pytensor.tensor.type import TensorType
  import pymc
  import pymc.sampling.parallel
  from pymc.pytensorf import floatX
label_desc: Use image node_id 4 for calling a global function with example usage: test_remote_pipe_closed() without return types