def METHOD_NAME(
    stagedir: Path, tmpdir: Path, volume_name: str, mkfshfs_tool: Path
):
    """
    When cross compiling, we zero fill an hfs file, that we will turn into
    a DMG. To do so we test the size of the staged dir, and add some slight
    padding to that.
    """
    hfs = tmpdir / "staged.hfs"
    output = subprocess.check_output(["du", "-s", stagedir])
    size = int(output.split()[0]) / 1000  # Get in MB
    size = int(size * 1.02)  # Bump the used size slightly larger.
    # Setup a proper file sized out with zero's
    subprocess.check_call(
        [
            "dd",
            "if=/dev/zero",
            "of={}".format(hfs),
            "bs=1M",
            "count={}".format(size),
        ]
    )
    subprocess.check_call([mkfshfs_tool, "-v", volume_name, hfs])