code: def report(self, item_id, report_format="json"):
          
          if report_format == "html":
              return "Report Unavailable"
  
          # grab an analysis id from the submission id.
          response = self._request("/analysis/sample/{sample_id}".format(sample_id=item_id),
                  headers=self.headers)
  
          try:
              # the highest score is probably the most interesting.
              # vmray uses this internally with sample_highest_vti_score so this seems like a safe assumption.
              analysis_id = 0
              top_score = -1
              for analysis in response.json()['data']:
                  if analysis['analysis_vti_score'] > top_score:
                      top_score = analysis['analysis_vti_score']
                      analysis_id = analysis['analysis_id']
  
          except (ValueError, KeyError) as e:
              raise sandboxapi.SandboxError(e)
  
          # assume report format json.
          response = self._request("/analysis/{analysis_id}/archive/logs/summary.json".format(analysis_id=analysis_id),
                  headers=self.headers)
  
          # if response is JSON, return it as an object.
          try:
              return response.json()
          except ValueError:
              pass
  
          # otherwise, return the raw content.
          return response.content
docs: Retrieves the specified report for the analyzed item, referenced by item_id.
  
          Available formats include: json.
  
          :type  item_id:       str
          :param item_id:       File ID number
          :type  report_format: str
          :param report_format: Return format
  
          :rtype:  dict
          :return: Dictionary representing the JSON parsed data or raw, for other
                   formats / JSON parsing failure.