def __init__(self, model, model_keys, instance_key='<STR_LIT>',<EOL>sort=None, model_keys_operator='<STR_LIT>',<EOL>default_spec_instance_keys=None,<EOL>extra_spec=None):
self.model = model<EOL>self.instance_key = instance_key<EOL>self.model_keys = model_keys<EOL>self.sort = sort<EOL>self.model_keys_operator = model_keys_operator<EOL>
:param mode: model class of the related document
:param model_keys: keys to use in generating mongo query spec from
    model data
:param instance_key: instance key that model[model_key] is mapped to
    in the default mongo query spec
:param sort: default mongo query sort spec, like [("field", direction)]
:param model_keys_operator: if multiple model_keys are given, the
    boolean mongo query to relate them, like $and, $or, etc.
:param default_spec_instance_keys: extra instance keys used to populate
    the default mongo query spec with, like 'abbr' or 'session'.
    Useful in constraining potentially brutal queries.