code: def test_spawn_densitydist_function():
      with pm.Model() as model:
          mu = pm.Normal("mu", 0, 1)
  
          def func(x):
              return -2 * (x**2).sum()
  
          obs = pm.CustomDist(
              "density_dist", logp=func, observed=np.random.randn(100)
          )
          with warnings.catch_warnings():
              warnings.filterwarnings(
                  "ignore", ".*number of samples.*", UserWarning
              )
              pm.sample(
                  draws=10,
                  tune=10,
                  step=pm.Metropolis(),
                  cores=2,
                  mp_ctx="spawn",
              )
  
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 8 for calling a global function with example usage: test_spawn_densitydist_function() and returns: unknown