def METHOD_NAME(course_id, separator='_'):
    """
    Generates a course-identifying unicode string for use in a file name.
    Args:
        course_id (object): A course identification object.
        separator (str): The character or chain of characters used for separating course details in
            the filename.
    Returns:
        str: A unicode string which can safely be inserted into a filename.
    """
    filename = str(separator).join([
        course_id.org,
        course_id.course,
        course_id.run
    ])
    enable_course_filename_ccx_suffix = settings.FEATURES.get(
        'ENABLE_COURSE_FILENAME_CCX_SUFFIX',
        False
    )
    if enable_course_filename_ccx_suffix and getattr(course_id, 'ccx', None):
        filename = separator.join([filename, 'ccx', course_id.ccx])
    return get_valid_filename(filename)