code: def delete(filething, delete_v1=True, delete_v2=True):
      
  
      f = filething.fileobj
  
      if delete_v1:
          tag, offset = find_id3v1(f)
          if tag is not None:
              f.seek(offset, 2)
              f.truncate()
  
      # technically an insize=0 tag is invalid, but we delete it anyway
      # (primarily because we used to write it)
      if delete_v2:
          f.seek(0, 0)
          idata = f.read(10)
          try:
              id3, vmaj, vrev, flags, insize = struct.unpack('>3sBBB4s', idata)
          except struct.error:
              pass
          else:
              insize = BitPaddedInt(insize)
              if id3 == b'ID3' and insize >= 0:
                  delete_bytes(f, insize + 10, 0)
docs: Remove tags from a file.
  
      Args:
          delete_v1 (bool): delete any ID3v1 tag
          delete_v2 (bool): delete any ID3v2 tag
  
      Raises:
          mutagen.MutagenError: In case deleting failed