def __init__(self, file, hb_info=None):
self._fid = file<EOL>if hb_info is None:<EOL><INDENT>self._hb_info = HBInfo.from_file(file)<EOL><DEDENT>else:<EOL><INDENT>self._hb_info = hb_info<EOL><DEDENT>
Create a HBFile instance.

        Parameters
        ----------
        file : file-object
            StringIO work as well
        hb_info : HBInfo
            Should be given as an argument for writing, in which case the file
            should be writable.