def _whatsnd(data):
 hdr = data[:512]
 fakefile = StringIO(hdr)
 for testfn in sndhdr.tests:
  res = testfn(hdr, fakefile)
  if (res is not None):
   return _sndhdr_MIMEmap.get(res[0])
 return None

def _whatsnd ( data ) : hdr = data [ : 512 ] fakefile = StringIO ( hdr ) for testfn in sndhdr . tests : res = testfn ( hdr , fakefile ) if ( res is not None ) : return _sndhdr_MIMEmap . get ( res [ 0 ] ) return None
try to identify a sound file type .