<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _map_smtp_headers_to_api_parameters(self, email_message):
 """ Map the values passed in SMTP headers to API-ready 2-item tuples present in HEADERS_MAP header values must be a single string or list or tuple of strings :return: 2-item tuples of the form (api_name, api_values) """

        api_data = []
        for smtp_key, api_transformer in six.iteritems(self._headers_map):
            data_to_transform = email_message.extra_headers.pop(smtp_key, None)
            if data_to_transform is not None:
                if isinstance(data_to_transform, (list, tuple)):
                    # map each value in the tuple/list
                    for data in data_to_transform:
                        api_data.append((api_transformer[0], api_transformer[1](data)))
                elif isinstance(data_to_transform, dict):
                    for data in six.iteritems(data_to_transform):
                        api_data.append(api_transformer(data))
                else:
                    # we only have one value
                    api_data.append((api_transformer[0], api_transformer[1](data_to_transform)))
        return api_data