def decorate_entry(entry, width=None, prepend=False):
    """Convert a value into a table cell.

    Args:
        entry: The value to decorate
        width: Final size of the table cell in characters
        prepend: Prepend table border character

    Returns:
        Decorated table cell
    """
    if width:
        md_entry = f" {entry}{' ' * (width - len(entry))} |"
    else:
        md_entry = f' {entry} |'
    if prepend:
        md_entry = f'|{md_entry}'
    return md_entry
