def _ensure_string(source):
    if isinstance(source, string_types):
        return source.rstrip()
    else:
        return _rstrip_lines(source)
Test that gen_filenames() yields the built-in Django locale files.
dataset/ETHPy150Open rossant/ipymd/ipymd/utils/utils.py/_ensure_string--crossover with--dataset/ETHPy150Open django/django/tests/utils_tests/test_autoreload.py/TestFilenameGenerator.test_django_locales