def deprecated(self, msg, version=None, removed=False, date=None, collection_name=None):
    if ((not removed) and (not C.DEPRECATION_WARNINGS)):
        return
    message_text = self.get_deprecation_message(msg, version=version, removed=removed, date=date, collection_name=collection_name)
    if removed:
        raise AnsibleError(message_text)
    wrapped = textwrap.wrap(message_text, self.columns, drop_whitespace=False)
    message_text = ('\n'.join(wrapped) + '\n')
    if (message_text not in self._deprecations):
        self.display(message_text.strip(), color=C.COLOR_DEPRECATE, stderr=True)
        self._deprecations[message_text] = 1
def deprecated(self, msg, version=None, removed=False, date=None, collection_name=None):
    if ((not removed) and (not C.DEPRECATION_WARNINGS)):
        return
    message_text = self.get_deprecation_message(msg, version=version, removed=removed, date=date, collection_name=collection_name)
    if removed:
        raise AnsibleError(message_text)
    wrapped = textwrap.wrap(message_text, self.columns, drop_whitespace=False)
    message_text = ('\n'.join(wrapped) + '\n')
    if (message_text not in self._deprecations):
        self.display(message_text.strip(), color=C.COLOR_DEPRECATE, stderr=True)
        self._deprecations[message_text] = 1