docstr: Create a HBFile instance.
  
  Parameters
  ----------
  file : file-object
      StringIO work as well
  hb_info : HBInfo, optional
      Should be given as an argument for writing, in which case the file
      should be writable.
docstr_tok: ["Create","a","HBFile","instance",".","Parameters","--","--","--","--","--","file",":","file-object","StringIO","work","as","well","hb_info",":","HBInfo",",","optional","Should","be","given","as","an","argument","for","writing",",","in","which","case","the","file","should","be","writable","."]
code: def __init__(self, file, hb_info=None):
      """Create a HBFile instance.
  
      Parameters
      ----------
      file : file-object
          StringIO work as well
      hb_info : HBInfo, optional
          Should be given as an argument for writing, in which case the file
          should be writable.
      """
      self._fid = file
      if hb_info is None:
          self._hb_info = HBInfo.from_file(file)
      else:
          # raise IOError("file %s is not writable, and hb_info "
          #              "was given." % file)
          self._hb_info = hb_info
  
imports: import warnings
  import numpy
  from scipy.sparse import csc_matrix
  from scipy.io.harwell_boeing._fortran_format_parser import FortranFormatParser, IntFormat, ExpFormat
label_desc: Use image node_id 1 to create a new HBFile object  with example: obj = HBFile(file, hb_info)