'Get instance of Model class by id.
Args:
key_names: A single id or a list of ids.
parent: Parent of instances to get.  Can be a model or key.
config: datastore_rpc.Configuration to use for this request.'

@classmethod
def get_by_id(cls, ids, parent=None, **kwargs):

    if isinstance(parent, Model):
        parent = parent.key()
    (ids, multiple) = datastore.NormalizeAndTypeCheck(ids, (int, long))
    keys = [datastore.Key.from_path(cls.kind(), id, parent=parent) for id in ids]
    if multiple:
        return get(keys, **kwargs)
    else:
        return get(keys[0], **kwargs)
