<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_cell(cell, datetime_fmt=None):
 """Format a cell."""

    if datetime_fmt and isinstance(cell, datetime):
        return cell.strftime(datetime_fmt)
    return cell