'Get instance of Model class by its key\'s name.
Args:
key_names: A single key-name or a list of key-names.
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_key_name(cls, key_names, parent=None, **kwargs):

    try:
        parent = _coerce_to_key(parent)
    except BadKeyError as e:
        raise BadArgumentError(str(e))
    (key_names, multiple) = datastore.NormalizeAndTypeCheck(key_names, basestring)
    keys = [datastore.Key.from_path(cls.kind(), name, parent=parent) for name in key_names]
    if multiple:
        return get(keys, **kwargs)
    else:
        return get(keys[0], **kwargs)
