<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def formatPoint(point, affine):
 """ Retrieves a string representation of @point """

    # Affine coordinates: (x,y)        
    if affine:
        fmt = "\tx:{}\n\ty:{}"
        coords = [point.x, point.y]

    # Projected coordinates: (x,y,z)
    else:
        fmt = "\tx:{}\n\ty:{}\n\tz:{}"
        coords = [point.x, point.y, point.z]

    coordText = map(hexString, coords)
    return fmt.format(*coordText)