code: def attach(self, num_name, write=0):
          
  
          if isinstance(num_name, bytes):
              num = self.find(num_name)
          else:
              num = num_name
          vg_id = _C.Vattach(self._hdf_inst._id, num,
                             write and 'w' or 'r')
          _checkErr('vattach', vg_id, "cannot attach Vgroup")
          return VG(self, vg_id)
docs: Open an existing vgroup given its name or its reference
          number, or create a new vgroup, returning a VG instance for
          that vgroup.
  
          Args::
  
            num_name      reference number or name of the vgroup to open,
                          or -1 to create a new vgroup; vcreate() can also
                          be called to create and name a new vgroup
            write         set to non-zero to open the vgroup in write mode
                          and to 0 to open it in readonly mode (default)
  
          Returns::
  
            VG instance for the vgroup
  
          An exception is raised if an attempt is made to open
          a non-existent vgroup.
  
          C library equivalent : Vattach