def METHOD_NAME(context, service, port, machine_name):
    service_type = service.split("-")[1]
    path = "/var/spool/apt-mirror/mirror/esm.ubuntu.com/{}/".format(
        service_type
    )
    cmd = "nohup sh -c 'python3 -m http.server --directory {} {} > /dev/null 2>&1 &'".format(  # noqa
        path, port
    )
    when_i_run_command(
        context,
        cmd,
        "with sudo",
        machine_name=machine_name,
    )
    context.service_mirror_cfg[service.replace("-", "_")]["port"] = port