How to wrap a Python function in a Julia package using PythonCall.jl

Adding this code inside the main module still results in a segfault

module DistanceTransforms
using PythonCall

const scipy = PythonCall.pynew()

function __init__()
    PythonCall.pycopy!(scipy, pyimport("scipy"))
end

export scipy