def get_gridfs_filename(batch_id, file_identifier):
    """
    Converts the given batch_id and the stdout/stderr string into a GridFS filename.

    :param batch_id: The batch id this stdout/stderr file is associated with
    :type batch_id: str
    :param file_identifier: The identifier of the file
    :type file_identifier: str
    :return: A string representing the stdout/stderr filename for the given batch
    :rtype: str
    """
    return '{}_{}'.format(batch_id, file_identifier)
