title: Filter dynamodb query result with multiple keys
body: <p>I'm relatively new to dynamodb so bear with me.
  I have a very large dataset that I'm designing an api for. I'm trying to support a route with a <code>q</code> query parameter that allows users to narrow down a search like so
  <code>/api/v1/base?q=this&lt;10,that&gt;30,else&gt;20</code></p>
  
  <p>My approach is to parse the query string and return appropriate <code>boto3.dynamodb.conditions.Attr</code>. So based on the above I have
  <code>Attr('this').lt(10) &amp; Attr('that').lt(30) &amp; Attr('else').lt(20)</code></p>
  
  <p>However if I try doing this <code>botocore</code> raises an error <code>Invalid FilterExpression: The expression has redundant parentheses</code></p>
  
  <p>This only happens when I combine more than two <code>attr</code>'s </p>
  
  <p>I'm not entirely sure what I'm doing wrong so any help would be appreciated</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here's some of the code</p>
  
  <pre><code>def filter_serial_no(serial_no, filter_string):
      try:
          response = table.query(
              KeyConditionExpression=Key('sn').eq(serial_no),
              FilterExpression=Attr('ENGINE_LOAD').gt(32) &amp; Attr('MAF').gt(400) &amp; Attr('SPEED').lt(10)
          )
      except ClientError as e:
          print(e.response['Error']['Message'])
      else:
          return response['Items']
  </code></pre>
  
  <p>RESULTS</p>
  
  <p><code>Invalid FilterExpression: The expression has redundant parentheses</code></p>