<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def checkpoint_filename(checkpoint, pipeline_name=None):
 """ Translate a checkpoint to a filename. This not only adds the checkpoint file extension but also standardizes the way in which checkpoint names are mapped to filenames. :param str | pypiper.Stage checkpoint: name of a pipeline phase/stage :param str pipeline_name: name of pipeline to prepend to the checkpoint filename; this differentiates checkpoint files, e.g. within the same sample output folder but associated with different pipelines, in case of the (somewhat probable) scenario of a stage name collision between pipelines the processed the same sample and wrote to the same output folder :return str | NoneType: standardized checkpoint name for file, plus extension; null if the input is a Stage that's designated as a non-checkpoint """

    # Allow Stage as type for checkpoint parameter's argument without
    # needing to import here the Stage type from stage.py module.
    try:
        base = checkpoint.checkpoint_name
    except AttributeError:
        base = translate_stage_name(checkpoint)
    if pipeline_name:
        base = "{}{}{}".format(
            pipeline_name, PIPELINE_CHECKPOINT_DELIMITER, base)
    return base + CHECKPOINT_EXTENSION