<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_postconditions(postconditions: List[icontract._Contract], prefix: Optional[str] = None) -> List[str]: """ Format postconditions as reST. :param postconditions: postconditions of a function :param prefix: prefix to be prepended to ``:ensures:`` directive :return: list of lines describing the postconditions """

    if not postconditions:
        return []

    result = []  # type: List[str]

    if prefix is not None:
        result.append(":{} ensures:".format(prefix))
    else:
        result.append(":ensures:")

    for postcondition in postconditions:
        result.append("    * {}".format(_format_contract(contract=postcondition)))

    return result