nodes: 0, module; 1, function_definition; 2, function_name:get_boundaries; 3, parameters; 4, block; 5, identifier:self; 6, identifier:filter_type; 7, identifier:value; 8, expression_statement; 9, assert_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, if_statement; 14, return_statement; 15, comment:"""Compute the boundaries to pass to the sorted-set command depending of the filter type
  
          The third return value, ``exclude`` is always ``None`` because we can easily restrict the
          score to filter on in the sorted-set.
  
          For the parameters, see BaseRangeIndex.store
  
          Notes
          -----
          For zrangebyscore:
          - `(` means "not included"
          - `-inf` alone means "from the very beginning"
          - `+inf` alone means "to the very end"
          """; 16, comparison_operator:filter_type in self.handled_suffixes; 17, assignment; 18, assignment; 19, assignment; 20, comparison_operator:filter_type in (None, 'eq'); 21, comment:# only one score; 22, block; 23, elif_clause; 24, elif_clause; 25, elif_clause; 26, elif_clause; 27, expression_list; 28, identifier:filter_type; 29, attribute; 30, identifier:start; 31, string; 32, identifier:end; 33, string; 34, identifier:exclude; 35, None; 36, identifier:filter_type; 37, tuple; 38, expression_statement; 39, comparison_operator:filter_type == 'gt'; 40, block; 41, comparison_operator:filter_type == 'gte'; 42, block; 43, comparison_operator:filter_type == 'lt'; 44, block; 45, comparison_operator:filter_type == 'lte'; 46, block; 47, identifier:start; 48, identifier:end; 49, identifier:exclude; 50, identifier:self; 51, identifier:handled_suffixes; 52, string_content:-inf; 53, string_content:+inf; 54, None; 55, string; 56, assignment; 57, identifier:filter_type; 58, string; 59, expression_statement; 60, identifier:filter_type; 61, string; 62, expression_statement; 63, identifier:filter_type; 64, string; 65, expression_statement; 66, identifier:filter_type; 67, string; 68, expression_statement; 69, string_content:eq; 70, identifier:start; 71, assignment; 72, string_content:gt; 73, assignment; 74, string_content:gte; 75, assignment; 76, string_content:lt; 77, assignment; 78, string_content:lte; 79, assignment; 80, identifier:end; 81, identifier:value; 82, identifier:start; 83, binary_operator:'(%s' % value; 84, identifier:start; 85, identifier:value; 86, identifier:end; 87, binary_operator:'(%s' % value; 88, identifier:end; 89, identifier:value; 90, string; 91, identifier:value; 92, string; 93, identifier:value; 94, string_content:(%s; 95, string_content:(%s
code: def get_boundaries(self, filter_type, value):
          """Compute the boundaries to pass to the sorted-set command depending of the filter type
  
          The third return value, ``exclude`` is always ``None`` because we can easily restrict the
          score to filter on in the sorted-set.
  
          For the parameters, see BaseRangeIndex.store
  
          Notes
          -----
          For zrangebyscore:
          - `(` means "not included"
          - `-inf` alone means "from the very beginning"
          - `+inf` alone means "to the very end"
          """
  
          assert filter_type in self.handled_suffixes
  
          start = '-inf'
          end = '+inf'
          exclude = None
  
          if filter_type in (None, 'eq'):
              # only one score
              start = end = value
  
          elif filter_type == 'gt':
              start = '(%s' % value
  
          elif filter_type == 'gte':
              start = value
  
          elif filter_type == 'lt':
              end = '(%s' % value
  
          elif filter_type == 'lte':
              end = value
  
          return start, end, exclude