@classmethod
def from_file(cls, file, *, library=None, client=None, save=False,
    retrieve_beatmap=True):
    """Read in a ``Replay`` object from an open file object.

        Parameters
        ----------
        file : file-like
            The file object to read from.
        library : Library, optional
            The library of beatmaps.
        client : Client, optional.
            The client used to find the beatmap.
        save : bool, optional
            If the beatmap needs to be downloaded with the client, should it be
            saved to disk?
        retrieve_beatmap : bool, optional
            Whether to retrieve the beatmap the replay is for.

        Returns
        -------
        replay : Replay
            The parsed replay object.

        Raises
        ------
        ValueError
            Raised when the file cannot be parsed as a ``.osr`` file.
        """
    return cls.parse(file.read(), library=library, client=client, save=save,
        retrieve_beatmap=retrieve_beatmap)
