def set_headers(self, *dict_or_key_value_pairs):
        """Sets _extra_ http headers to send in future requests.

        For HTTP headers; not to be confused with the SOAP header element.

        Example:
        | Set Headers | X-Requested-With  | autogen          | # using key-value pairs |
        or using a dictionary:
        | ${headers}= | Create Dictionary | X-Requested-With | autogen                 |
        | Set Headers | ${headers}        |                  | # using a dictionary    |
        """
        length = len(dict_or_key_value_pairs)
        if length == 1:
            headers = dict_or_key_value_pairs[0]
        elif length % 2 == 0:
            headers = {}
            for i in range(0, len(dict_or_key_value_pairs), 2):
                headers[dict_or_key_value_pairs[i]] = dict_or_key_value_pairs[i + 1]
        else:
            raise ValueError("There should be an even number of name-value pairs.")
        self._client().set_options(headers=headers)
dataset/ETHPy150Open ombre42/robotframework-sudslibrary/src/SudsLibrary/options.py/_OptionsKeywords.set_headers/original