<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bin_open(fname: str):
 """ Returns a file descriptor for a plain text or gzipped file, binary read mode for subprocess interaction. :param fname: The filename to open. :return: File descriptor in binary read mode. """

    if fname.endswith(".gz"):
        return gzip.open(fname, "rb")
    return open(fname, "rb")