<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def interleaved_filename(file_path):
 """Return filename used to represent a set of paired-end files. Assumes Illumina-style naming conventions where each file has _R1_ or _R2_ in its name."""

    if not isinstance(file_path, tuple):
        raise OneCodexException("Cannot get the interleaved filename without a tuple.")
    if re.match(".*[._][Rr][12][_.].*", file_path[0]):
        return re.sub("[._][Rr][12]", "", file_path[0])
    else:
        warnings.warn("Paired-end filenames do not match--are you sure they are correct?")
        return file_path[0]