nodes: 0, module; 1, function_definition; 2, function_name:search_by_category; 3, parameters; 4, block; 5, identifier:self; 6, identifier:category_id; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, if_statement; 15, return_statement; 16, identifier:limit; 17, integer:0; 18, identifier:order_by; 19, None; 20, identifier:sort_order; 21, None; 22, identifier:filter; 23, None; 24, comment:"""
          Search for series that belongs to a category id. Returns information about matching series in a DataFrame.
  
          Parameters
          ----------
          category_id : int
              category id, e.g., 32145
          limit : int, optional
              limit the number of results to this value. If limit is 0, it means fetching all results without limit.
          order_by : str, optional
              order the results by a criterion. Valid options are 'search_rank', 'series_id', 'title', 'units', 'frequency',
              'seasonal_adjustment', 'realtime_start', 'realtime_end', 'last_updated', 'observation_start', 'observation_end',
              'popularity'
          sort_order : str, optional
              sort the results by ascending or descending order. Valid options are 'asc' or 'desc'
          filter : tuple, optional
              filters the results. Expects a tuple like (filter_variable, filter_value).
              Valid filter_variable values are 'frequency', 'units', and 'seasonal_adjustment'
  
          Returns
          -------
          info : DataFrame
              a DataFrame containing information about the matching Fred series
          """; 25, assignment; 26, assignment; 27, comparison_operator:info is None; 28, block; 29, identifier:info; 30, identifier:url; 31, binary_operator:"%s/category/series?category_id=%d&" % (self.root_url,
                                                        category_id); 32, identifier:info; 33, call; 34, identifier:info; 35, None; 36, raise_statement; 37, string:"%s/category/series?category_id=%d&"; 38, tuple; 39, attribute; 40, argument_list; 41, call; 42, attribute; 43, identifier:category_id; 44, identifier:self; 45, identifier:__get_search_results; 46, identifier:url; 47, identifier:limit; 48, identifier:order_by; 49, identifier:sort_order; 50, identifier:filter; 51, identifier:ValueError; 52, argument_list; 53, identifier:self; 54, identifier:root_url; 55, binary_operator:'No series exists for category id: ' + str(category_id); 56, string; 57, call; 58, string_content:No series exists for category id:; 59, identifier:str; 60, argument_list; 61, identifier:category_id
code: def search_by_category(self, category_id, limit=0, order_by=None, sort_order=None, filter=None):
          """
          Search for series that belongs to a category id. Returns information about matching series in a DataFrame.
  
          Parameters
          ----------
          category_id : int
              category id, e.g., 32145
          limit : int, optional
              limit the number of results to this value. If limit is 0, it means fetching all results without limit.
          order_by : str, optional
              order the results by a criterion. Valid options are 'search_rank', 'series_id', 'title', 'units', 'frequency',
              'seasonal_adjustment', 'realtime_start', 'realtime_end', 'last_updated', 'observation_start', 'observation_end',
              'popularity'
          sort_order : str, optional
              sort the results by ascending or descending order. Valid options are 'asc' or 'desc'
          filter : tuple, optional
              filters the results. Expects a tuple like (filter_variable, filter_value).
              Valid filter_variable values are 'frequency', 'units', and 'seasonal_adjustment'
  
          Returns
          -------
          info : DataFrame
              a DataFrame containing information about the matching Fred series
          """
          url = "%s/category/series?category_id=%d&" % (self.root_url,
                                                        category_id)
          info = self.__get_search_results(url, limit, order_by, sort_order, filter)
          if info is None:
              raise ValueError('No series exists for category id: ' + str(category_id))
          return info