def get_meteor_ids(model, object_ids):
<EOL>meta = model._meta<EOL>result = collections.OrderedDict(<EOL>(str(obj_pk), None)<EOL>for obj_pk<EOL>in object_ids<EOL>)<EOL>if isinstance(meta.pk, AleaIdField):<EOL><INDENT>return collections.OrderedDict(<EOL>(obj_pk, obj_pk) for obj_pk in object_ids<EOL>)<EOL><DEDENT>alea_unique_fields = [<EOL>field<EOL>for field in meta.local_fields<EOL>if isinstance(field, AleaIdField) and field.unique and not field.null<EOL>]<EOL>if len(alea_unique_fields) == <NUM_LIT:1>:<EOL><INDENT>aid = alea_unique_fields[<NUM_LIT:0>].name<EOL>query = model.objects.filter(<EOL>pk__in=object_ids,<EOL>).values_list('<STR_LIT>', aid)<EOL><DEDENT>else:<EOL><INDENT>content_type = ContentType.objects.get_for_model(model)<EOL>query = ObjectMapping.objects.filter(<EOL>content_type=content_type,<EOL>object_id__in=list(result)<EOL>).values_list('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>for obj_pk, meteor_id in query:<EOL><INDENT>result[str(obj_pk)] = meteor_id<EOL><DEDENT>for obj_pk, meteor_id in result.items():<EOL><INDENT>if meteor_id is None:<EOL><INDENT>result[obj_pk] = get_meteor_id(model, obj_pk)<EOL><DEDENT><DEDENT>return result<EOL>
Return Alea ID mapping for all given ids of specified model.