from typing import Dict
from typing import Union


def params_to_line(params: Dict[str, Union[str, int]]) -> str:
    """
    Transforms a dictionary of parameters into a command line arguments.

    :param params: A dictionary of parameter names to values.
    :return: A executable python command.
    """
    base = 'python train.py'
    for param, value in params.items():
        if value is None:
            base += f' --{param}'
        else:
            base += f' --{param} {value}'

    return base + '\n'