<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _send_cmd(self, cmd: str):
 """Encode IQFeed API messages."""

        self._sock.sendall(cmd.encode(encoding='latin-1', errors='strict'))