from typing import Dict
from typing import Any
from datetime import datetime


def capture_config(**kwargs) -> Dict[str, Any]:
    """
    Capture arguments for the current experiment and add timestamps.

    Parameters
    ----------
    kwargs: Dict
        Arguments for the current experiment.

    Returns
    -------
    config : Dict
    """
    config = {k: v for k, v in kwargs.items()}
    config['timestamp'] = "{:.0f}".format(datetime.utcnow().timestamp())
    # The local time is for convenience.
    config['local_timestamp'] = str(datetime.now())
    return config