<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close_position(self, repay_only):
 """ Close position. Args: repay_only (bool):
 Undocumented by cbpro. Returns: Undocumented """

        params = {'repay_only': repay_only}
        return self._send_message('post', '/position/close',
                                  data=json.dumps(params))