def get_deprecation_message(self, msg, version=None, removed=False, date=None, collection_name=None):
    ' used to print out a deprecation message.'
    msg = msg.strip()
    if (msg and (msg[(- 1)] not in ['!', '?', '.'])):
        msg += '.'
    if (collection_name == 'ansible.builtin'):
        collection_name = 'ansible-base'
    if removed:
        header = '[DEPRECATED]: {0}'.format(msg)
        removal_fragment = 'This feature was removed'
        help_text = 'Please update your playbooks.'
    else:
        header = '[DEPRECATION WARNING]: {0}'.format(msg)
        removal_fragment = 'This feature will be removed'
        help_text = 'Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.'
    if collection_name:
        from_fragment = 'from {0}'.format(collection_name)
    else:
        from_fragment = ''
    if date:
        when = 'in a release after {0}.'.format(date)
    elif version:
        when = 'in version {0}.'.format(version)
    else:
        when = 'in a future release.'
    message_text = ' '.join((f for f in [header, removal_fragment, from_fragment, when, help_text] if f))
    return message_text
used to print out a deprecation message.
def get_deprecation_message(self, msg, version=None, removed=False, date=None, collection_name=None):
    ' '
    msg = msg.strip()
    if (msg and (msg[(- 1)] not in ['!', '?', '.'])):
        msg += '.'
    if (collection_name == 'ansible.builtin'):
        collection_name = 'ansible-base'
    if removed:
        header = '[DEPRECATED]: {0}'.format(msg)
        removal_fragment = 'This feature was removed'
        help_text = 'Please update your playbooks.'
    else:
        header = '[DEPRECATION WARNING]: {0}'.format(msg)
        removal_fragment = 'This feature will be removed'
        help_text = 'Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.'
    if collection_name:
        from_fragment = 'from {0}'.format(collection_name)
    else:
        from_fragment = 
    if date:
        when = 'in a release after {0}.'.format(date)
    elif version:
        when = 'in version {0}.'.format(version)
    else:
        when = 'in a future release.'
    message_text = ' '.join((f for f in [header, removal_fragment, from_fragment, when, help_text] if f))
    return message_text