title: Beam/Dataflow Python: AttributeError: '_UnwindowedValues' object has no attribute 'sort'
body: <p>I am developing a workflow process to run on Google Cloud Dataflow using the Python SDK from Apache Beam. </p>
  
  <p>When running locally the workflow successfully completes with no errors and the data output is exactly as expected. </p>
  
  <p>When I try to run on Dataflow service, it throws the following error:
  <code>AttributeError: '_UnwindowedValues' object has no attribute 'sort'</code></p>
  
  <p>Which is from the following piece of code:</p>
  
  <pre><code>class OrderByDate(beam.DoFn):
  def process(self, context):
      (k, v) = context.element
      v.sort(key=operator.itemgetter('date'))
      return [(k, v)]
  </code></pre>
  
  <p>And this is called using the standard <code>beam.ParDo</code> like so:</p>
  
  <pre><code>'order_by_dates' &gt;&gt; beam.ParDo(OrderByDate())
  </code></pre>
  
  <p>The data in the <code>(k, v)</code> tuple looks like this example:</p>
  
  <pre><code>('SOME CODE', {'date':'2017-01-01', 'value':1, 'date':'2016-12-14', 'value':4}) 
  </code></pre>
  
  <p>With <code>v</code> being the object of dates and values</p>
  
  <p>I have tried switching to a standard lambda function also throws the same error.</p>
  
  <p>Any ideas why this is running differently locally vs on Dataflow? Or suggested work around.</p>