nodes: 0, module; 1, function_definition; 2, function_name:get_reports_page; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, expression_statement; 13, expression_statement; 14, comment:# explicitly compare to True and False to distinguish from None (which is treated as False in a conditional); 15, if_statement; 16, if_statement; 17, expression_statement; 18, expression_statement; 19, expression_statement; 20, comment:# create a Page object from the dict; 21, return_statement; 22, identifier:is_enclave; 23, None; 24, identifier:enclave_ids; 25, None; 26, identifier:tag; 27, None; 28, identifier:excluded_tags; 29, None; 30, identifier:from_time; 31, None; 32, identifier:to_time; 33, None; 34, comment:"""
          Retrieves a page of reports, filtering by time window, distribution type, enclave association, and tag.
          The results are sorted by updated time.
          This method does not take ``page_number`` and ``page_size`` parameters.  Instead, each successive page must be
          found by adjusting the ``from_time`` and ``to_time`` parameters.
  
          Note:  This endpoint will only return reports from a time window of maximum size of 2 weeks. If you give a
          time window larger than 2 weeks, it will pull reports starting at 2 weeks before the "to" date, through the
          "to" date.
  
          :param boolean is_enclave: restrict reports to specific distribution type (optional - by default all accessible
              reports are returned).
          :param list(str) enclave_ids: list of enclave ids used to restrict reports to specific enclaves (optional - by
              default reports from all of user's enclaves are returned)
          :param list(str) tag: Name (or list of names) of tag(s) to filter reports by.  Only reports containing
              ALL of these tags will be returned.
          :param list(str) excluded_tags: Reports containing ANY of these tags will be excluded from the results.
          :param int from_time: start of time window in milliseconds since epoch (optional)
          :param int to_time: end of time window in milliseconds since epoch (optional)
  
          :return: A |Page| of |Report| objects.
  
          """; 35, assignment; 36, identifier:is_enclave; 37, block; 38, elif_clause; 39, comparison_operator:enclave_ids is None; 40, block; 41, assignment; 42, assignment; 43, assignment; 44, identifier:result; 45, identifier:distribution_type; 46, None; 47, expression_statement; 48, not_operator; 49, block; 50, identifier:enclave_ids; 51, None; 52, expression_statement; 53, identifier:params; 54, dictionary; 55, identifier:resp; 56, call; 57, identifier:result; 58, call; 59, assignment; 60, identifier:is_enclave; 61, expression_statement; 62, assignment; 63, pair; 64, pair; 65, pair; 66, pair; 67, pair; 68, pair; 69, attribute; 70, argument_list; 71, attribute; 72, argument_list; 73, identifier:distribution_type; 74, attribute; 75, assignment; 76, identifier:enclave_ids; 77, attribute; 78, string; 79, identifier:from_time; 80, string; 81, identifier:to_time; 82, string; 83, identifier:distribution_type; 84, string; 85, identifier:enclave_ids; 86, string; 87, identifier:tag; 88, string; 89, identifier:excluded_tags; 90, attribute; 91, identifier:get; 92, string:"reports"; 93, keyword_argument; 94, identifier:Page; 95, identifier:from_dict; 96, call; 97, keyword_argument; 98, identifier:DistributionType; 99, identifier:ENCLAVE; 100, identifier:distribution_type; 101, attribute; 102, identifier:self; 103, identifier:enclave_ids; 104, string_content:from; 105, string_content:to; 106, string_content:distributionType; 107, string_content:enclaveIds; 108, string_content:tags; 109, string_content:excludedTags; 110, identifier:self; 111, identifier:_client; 112, identifier:params; 113, identifier:params; 114, attribute; 115, argument_list; 116, identifier:content_type; 117, identifier:Report; 118, identifier:DistributionType; 119, identifier:COMMUNITY; 120, identifier:resp; 121, identifier:json
code: def get_reports_page(self, is_enclave=None, enclave_ids=None, tag=None, excluded_tags=None,
                           from_time=None, to_time=None):
          """
          Retrieves a page of reports, filtering by time window, distribution type, enclave association, and tag.
          The results are sorted by updated time.
          This method does not take ``page_number`` and ``page_size`` parameters.  Instead, each successive page must be
          found by adjusting the ``from_time`` and ``to_time`` parameters.
  
          Note:  This endpoint will only return reports from a time window of maximum size of 2 weeks. If you give a
          time window larger than 2 weeks, it will pull reports starting at 2 weeks before the "to" date, through the
          "to" date.
  
          :param boolean is_enclave: restrict reports to specific distribution type (optional - by default all accessible
              reports are returned).
          :param list(str) enclave_ids: list of enclave ids used to restrict reports to specific enclaves (optional - by
              default reports from all of user's enclaves are returned)
          :param list(str) tag: Name (or list of names) of tag(s) to filter reports by.  Only reports containing
              ALL of these tags will be returned.
          :param list(str) excluded_tags: Reports containing ANY of these tags will be excluded from the results.
          :param int from_time: start of time window in milliseconds since epoch (optional)
          :param int to_time: end of time window in milliseconds since epoch (optional)
  
          :return: A |Page| of |Report| objects.
  
          """
  
          distribution_type = None
  
          # explicitly compare to True and False to distinguish from None (which is treated as False in a conditional)
          if is_enclave:
              distribution_type = DistributionType.ENCLAVE
          elif not is_enclave:
              distribution_type = DistributionType.COMMUNITY
  
          if enclave_ids is None:
              enclave_ids = self.enclave_ids
  
          params = {
              'from': from_time,
              'to': to_time,
              'distributionType': distribution_type,
              'enclaveIds': enclave_ids,
              'tags': tag,
              'excludedTags': excluded_tags
          }
          resp = self._client.get("reports", params=params)
          result = Page.from_dict(resp.json(), content_type=Report)
  
          # create a Page object from the dict
          return result