nodes: 0, module; 1, function_definition; 2, function_name:get_comments; 3, parameters; 4, block; 5, identifier:self; 6, identifier:resource; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, try_statement; 11, return_statement; 12, identifier:before; 13, None; 14, comment:""" Get comments for a file or URL.
  
          Retrieve a list of VirusTotal Community comments for a given file or URL. VirusTotal Community comments are
          user submitted reviews on a given item, these comments may contain anything from the in-the-wild locations of
          files up to fully-featured reverse engineering reports on a given sample.
  
          :param resource: Either an md5/sha1/sha256 hash of the file or the URL itself you want to retrieve.
          :param before: (optional) A datetime token that allows you to iterate over all comments on a specific item
          whenever it has been commented on more than 25 times.
          :return: JSON response - The application answers with the comments sorted in descending order according to
          their date.
          """; 15, assignment; 16, block; 17, except_clause; 18, call; 19, identifier:params; 20, call; 21, expression_statement; 22, as_pattern; 23, block; 24, identifier:_return_response_and_status_code; 25, argument_list; 26, identifier:dict; 27, argument_list; 28, assignment; 29, attribute; 30, as_pattern_target; 31, return_statement; 32, identifier:response; 33, keyword_argument; 34, keyword_argument; 35, keyword_argument; 36, identifier:response; 37, call; 38, identifier:requests; 39, identifier:RequestException; 40, identifier:e; 41, call; 42, identifier:apikey; 43, attribute; 44, identifier:resource; 45, identifier:resource; 46, identifier:before; 47, identifier:before; 48, attribute; 49, argument_list; 50, identifier:dict; 51, argument_list; 52, identifier:self; 53, identifier:api_key; 54, identifier:requests; 55, identifier:get; 56, binary_operator:self.base + 'comments/get'; 57, keyword_argument; 58, keyword_argument; 59, keyword_argument; 60, attribute; 61, string; 62, identifier:params; 63, identifier:params; 64, identifier:proxies; 65, attribute; 66, identifier:error; 67, attribute; 68, identifier:self; 69, identifier:base; 70, string_content:comments/get; 71, identifier:self; 72, identifier:proxies; 73, identifier:e; 74, identifier:message
code: def get_comments(self, resource, before=None):
          """ Get comments for a file or URL.
  
          Retrieve a list of VirusTotal Community comments for a given file or URL. VirusTotal Community comments are
          user submitted reviews on a given item, these comments may contain anything from the in-the-wild locations of
          files up to fully-featured reverse engineering reports on a given sample.
  
          :param resource: Either an md5/sha1/sha256 hash of the file or the URL itself you want to retrieve.
          :param before: (optional) A datetime token that allows you to iterate over all comments on a specific item
          whenever it has been commented on more than 25 times.
          :return: JSON response - The application answers with the comments sorted in descending order according to
          their date.
          """
          params = dict(apikey=self.api_key, resource=resource, before=before)
  
          try:
              response = requests.get(self.base + 'comments/get', params=params, proxies=self.proxies)
          except requests.RequestException as e:
              return dict(error=e.message)
  
          return _return_response_and_status_code(response)