'Convert the given entity into CSV string.
Args:
entity: The entity to encode.
Returns:
A CSV string.'

def __EncodeEntity(self, entity):

    output = StringIO.StringIO()
    writer = csv.writer(output)
    writer.writerow(self.__ExtractProperties(entity))
    return output.getvalue()
