code: def create_statement(
          self, session_id: int, code: str, kind: StatementKind = None
      ) -> Statement:
          
  
          data = {"code": code}
  
          if kind is not None:
              if self.legacy_server():
                  LOGGER.warning("statement kind ignored on Livy<0.5.0")
              data["kind"] = kind.value
  
          response = self._client.post(
              f"/sessions/{session_id}/statements", data=data
          )
          return Statement.from_json(session_id, response)
docs: Run a statement in a session.
  
          :param session_id: The ID of the session.
          :param code: The code to execute.
          :param kind: The kind of code to execute.