docstr: From requests result 
docstr_tok: ["From","requests","result"]
code: def from_result(
      cls,
      res,
      request_cls=None,
      logger=None,
      service=None,
      action=None,
      session=None,
  ):
      """From requests result"""
      response_cls = get_response_cls(request_cls)
  
      if res is None:
          return cls._make_raw_response(
              request_cls=request_cls, service=service, action=action
          )
  
      try:
          data = res.json()
      except ValueError:
          return cls._make_raw_response(
              request_cls=request_cls,
              service=service,
              action=action,
              status_code=res.status_code,
              text=res.text,
          )
      if "meta" not in data:
          raise ValueError("Missing meta section in response payload")
      try:
          meta = ResponseMeta(**data["meta"])
          # TODO: validate meta?
          # meta.validate()
      except Exception as ex:
          raise ValueError(
              "Failed parsing meta section in response payload (data=%s, error=%s)"
              % (data, ex)
          )
  
      response = None
      response_data = None
      try:
          response_data = data.get("data", {})
          if response_cls:
              response = response_cls(**response_data)
              # TODO: validate response?
              # response.validate()
      except Exception as e:
          if logger:
              logger.warning("Failed parsing response: %s" % str(e))
      return cls(
          meta=meta,
          response=response,
          response_data=response_data,
          request_cls=request_cls,
          session=session,
      )
  
file_path: clearml/clearml/backend_api/session/callresult.py
imports: import sys
  import time
  from ...backend_api.utils import get_response_cls
  from .response import ResponseMeta, Response
  from .errors import ResultNotReadyError, TimeoutExpiredError
label_desc: Use image node_id 8 for calling the CallResult obj's underlying member method code with example usage: obj.from_result(cls, res, request_cls, logger, service, action, session) and returns: cls, cls, cls