<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def SendToExecSocket(self, code, tid=None):
 """Inject python code into exec socket."""

    response = self._SendToExecSocketRaw(json.dumps(code), tid)
    return json.loads(response)