##### SUMMARY
See https://github.com/ansible/ansible/blob/88d8cf8197c53edd3bcdcd21429eb4c2bfbf0f6a/lib/ansible/module_utils/basic.py#L699-L706

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
lib/ansible/module_utils/basic.py

##### ANSIBLE VERSION
```paste below
2.9
devel
```

if isinstance(warning, string_types):
            self._warnings.append(warning)
            self.log('[WARNING] %s' % warning)
        else:
            raise TypeError("warn requires a string not a %s" % type(warning))
    def deprecate(self, msg, version=None):
        if isinstance(msg, string_types):
            self._deprecations.append({
                'msg': msg,
                'version': version
            })
            self.log('[DEPRECATION WARNING] %s %s' % (msg, version))
        else:
            raise TypeError("deprecate requires a string not a %s" % type(msg))
    def load_file_common_arguments(self, params):
        '''
        many modules deal with files, this encapsulates common
        options that the file module accepts such that it is directly
        available to all modules and they can share code.
        '''
        path = params.get('path', params.get('dest', None))
        if path is None:
            return {}
        else:
            path = os.path.expanduser(os.path.expandvars(path))
        b_path = to_bytes(path, errors='surrogate_or_strict')