def get_timestamp(time=True, date=True, fmt=None):
time_format = "<STR_LIT>"<EOL>date_format = "<STR_LIT>"<EOL>if fmt is None:<EOL><INDENT>if time and date:<EOL><INDENT>fmt = time_format + "<STR_LIT:U+0020>" + date_format<EOL><DEDENT>elif time:<EOL><INDENT>fmt = time_format<EOL><DEDENT>elif date:<EOL><INDENT>fmt = date_format<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>return datetime.now().strftime(fmt)<EOL>
Return the current timestamp in machine local time.

    Parameters:
    -----------
    time, date : Boolean
        Flag to include the time or date components, respectively,
        in the output.
    fmt : str, optional
        If passed, will override the time/date choice and use as
        the format string passed to `strftime`.