docs: def writeMixedArray(self, o):
          """
          Write mixed array to the data stream.
  
          @type o: L{pyamf.MixedArray}
          """
          if self.writeReference(o) != -1:
              return
  
          self.context.addObject(o)
          self.writeType(TYPE_MIXEDARRAY)
  
          # TODO: optimise this
          # work out the highest integer index
          try:
              # list comprehensions to save the day
              max_index = max([y[0] for y in o.items()
                  if isinstance(y[0], (int, long))])
  
              if max_index < 0:
                  max_index = 0
          except ValueError:
              max_index = 0
  
          self.stream.write_ulong(max_index)
  
          self._writeDict(o)
          self._writeEndObject()