from typing import Dict


def allocate_task_within_node(
    distribution_config: Dict[str, int], machines_dict: Dict[str, int]
) -> Dict[str, Dict[str, int]]:
    """Try to fit a task in a node without splitting.

    Parameters
    ----------
    distribution_config : dict
        Data about required distribution for the project.
    machines_dict : dict
        All available machines in pool.

    Returns
    -------
    machines : dict
        Allocated machines for the project or ``None`` if not allocated.

    """
    for machine, cores in machines_dict.items():
        if cores - distribution_config["cores"] >= 0:
            return {
                machine: {
                    "cores": distribution_config["cores"],
                    "tasks": distribution_config.get("parametric_tasks", 1),
                }
            }
    return {}