def METHOD_NAME(
    XYZ, srcLoc, sig, t, moment, fieldType="h", mu_r=1
):
    mu = 4 * np.pi * 1e-7 * mu_r
    if isinstance(moment, str):
        if moment.upper() == "X":
            mx, my, mz = 1.0, 0.0, 0.0
        elif moment.upper() == "Y":
            mx, my, mz = 0.0, 1.0, 0.0
        elif moment.upper() == "Z":
            mx, my, mz = 0.0, 0.0, 1.0
        else:
            raise NotImplementedError("String type for moment not recognized")
    else:
        mx, my, mz = moment[0], moment[1], moment[2]
    XYZ = utils.as_array_n_by_dim(XYZ, 3)
    dx = XYZ[:, 0] - srcLoc[0]
    dy = XYZ[:, 1] - srcLoc[1]
    dz = XYZ[:, 2] - srcLoc[2]
    r = np.sqrt(dx**2.0 + dy**2.0 + dz**2.0)
    k = np.sqrt(mu * sig / (4 * t))
    kr = k * r
    if fieldType == "e":
        front = 1 / (4.0 * np.pi * sig * r**3)
        mid = 3 * erf(kr) - (4 * kr**3 + 6 * kr) * np.exp(-(kr**2)) / np.sqrt(pi)
        end = -erf(kr) + (4 * kr**3 + 2 * kr) * np.exp(-(kr**2)) / np.sqrt(pi)
        Fx = front * (
            mx * ((dx**2 / r**2) * mid + end)
            + my * (dy * dx / r**2) * mid
            + mz * (dz * dx / r**2) * mid
        )
        Fy = front * (
            mx * (dx * dy / r**2) * mid
            + my * ((dy**2 / r**2) * mid + end)
            + mz * (dz * dy / r**2) * mid
        )
        Fz = front * (
            mx * (dx * dz / r**2) * mid
            + my * (dy * dz / r**2) * mid
            + mz * ((dz**2 / r**2) * mid + end)
        )
    elif fieldType == "h":
        front = (1 / (4.0 * pi * r**3)) * (
            erf(kr) - 2 * kr * np.exp(-(kr**2)) / np.sqrt(pi)
        )
        Fx = front * (my * -dz + mz * dy)
        Fy = front * (mx * dz + mz * -dx)
        Fz = front * (mx * -dy + my * dx)
    elif fieldType == "dhdt":
        front = -(2 * k**5 / (pi**1.5 * mu * sig)) * np.exp(-(kr**2))
        Fx = front * (my * -dz + mz * dy)
        Fy = front * (mx * dz + mz * -dx)
        Fz = front * (mx * -dy + my * dx)
    return Fx, Fy, Fz