Construct nicely formatted start/end markers in FITS history.
function : func
Function calling history
mode : str, ‘begin’ or ‘end’
A different string is produced for the beginning and the end. Default is ‘begin’.
time : datetime
If not set, defaults to current date/time.