def _make_options(self, q_options):
if not (q_options or self.__projection):<EOL><INDENT>return self.default_options<EOL><DEDENT>if '<STR_LIT>' in q_options:<EOL><INDENT>if '<STR_LIT>' in q_options:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>q_options['<STR_LIT>'] = q_options.pop('<STR_LIT>')<EOL><DEDENT>if q_options.get('<STR_LIT>'):<EOL><INDENT>try:<EOL><INDENT>q_options['<STR_LIT>'] = self._to_property_names(<EOL>q_options['<STR_LIT>'])<EOL><DEDENT>except TypeError as e:<EOL><INDENT>raise datastore_errors.BadArgumentError(e)<EOL><DEDENT>self._check_properties(q_options['<STR_LIT>'])<EOL><DEDENT>options = QueryOptions(**q_options)<EOL>if (options.keys_only is None and<EOL>options.projection is None and<EOL>self.__projection):<EOL><INDENT>options = QueryOptions(<EOL>projection=self._to_property_names(self.__projection), config=options)<EOL><DEDENT>if self.default_options is not None:<EOL><INDENT>options = self.default_options.merge(options)<EOL><DEDENT>return options<EOL>
Helper to construct a QueryOptions object from keyword arguments.

        Args:
          q_options: a dict of keyword arguments.

        Note that either 'options' or 'config' can be used to pass another
        QueryOptions object, but not both.  If another QueryOptions object is
        given it provides default values.

        If self.default_options is set, it is used to provide defaults,
        which have a lower precedence than options set in q_options.

        Returns:
          A QueryOptions object, or None if q_options is empty.