def METHOD_NAME(
    c: Connection, machine: str = 'magma', force_provision: bool = False,
    max_retries: int = 1,
) -> Tuple[Connection, Dict[str, str]]:
    """ Host config for local Vagrant VM.
    Sets the environment to point at the local vagrant machine. Used
    whenever we need to run commands on the vagrant machine.
    Parameters:
        c: The connection context for execution
        machine: The machine that should be setup
        force_provision: Whether provisioning should be done
        max_retries: Max attempts to setup machine
    Returns:
        Connection to the set up vm and meta information
    """
    _ensure_in_vagrant_dir(c)
    # An empty local ssh config file stops warnings from being printed.
    c.run('touch ~/.ssh/config')
    # Ensure that VM is not already running
    if not _is_vm_running(c, machine):
        _vagrant_up_with_retry(c, machine, max_retries)
    elif force_provision:
        c.run(f'vagrant provision {machine}')
    ssh_config = c.run(f'vagrant ssh-config {machine}', hide=True).stdout.strip()
    ssh_lines = [line.strip() for line in ssh_config.split("\n")]
    ssh_key_val = [line.split(" ", 1) for line in ssh_lines]
    ssh_params = {
        key: val
        for key, val in ssh_key_val
    }
    host = ssh_params.get("HostName", "").strip()
    port = ssh_params.get("Port", "").strip()
    # some installations seem to have quotes around the file location
    identity_file = ssh_params.get("IdentityFile", "").strip().strip('"')
    host_string = f'vagrant@{host}:{port}'
    return Connection(
        host_string, connect_kwargs={"key_filename": identity_file},
    ), {
        "host_string": host_string,
        "key_filename": identity_file,
    }