parameters: (self, frame_id)
return_statement: return (frame_main_resource.request_id in self._ad_requests
              or frame_main_resource.request_id in self._tracking_requests)
docstring: A Frame is an Ad frame if it's not the main frame and its main resource
      is ad or tracking-related.
docstring_summary: A Frame is an Ad frame if it's not the main frame and its main resource
      is ad or tracking-related.
docstring_tokens: A Frame is an Ad frame if it s not the main frame and its main resource is ad or tracking - related .
function: def IsAdOrTrackingFrame(self, frame_id):
      """A Frame is an Ad frame if it's not the main frame and its main resource
      is ad or tracking-related.
      """
      if (frame_id not in self._frame_to_requests
          or frame_id == self._main_frame_id):
        return False
      frame_requests = [self._requests_by_id[request_id]
                        for request_id in self._frame_to_requests[frame_id]]
      sorted_frame_resources = sorted(
          frame_requests, key=operator.attrgetter('start_msec'))
      frame_main_resource = sorted_frame_resources[0]
      return (frame_main_resource.request_id in self._ad_requests
              or frame_main_resource.request_id in self._tracking_requests)
function_tokens: def IsAdOrTrackingFrame ( self , frame_id ) : if ( frame_id not in self . _frame_to_requests or frame_id == self . _main_frame_id ) : return False frame_requests = [ self . _requests_by_id [ request_id ] for request_id in self . _frame_to_requests [ frame_id ] ] sorted_frame_resources = sorted ( frame_requests , key = operator . attrgetter ( 'start_msec' ) ) frame_main_resource = sorted_frame_resources [ 0 ] return ( frame_main_resource . request_id in self . _ad_requests or frame_main_resource . request_id in self . _tracking_requests )