code: def from_buffer(buffer, mime=False):
      
      m = _get_magic_type(mime)
      return m.from_buffer(buffer)
docs: Accepts a binary string and returns the detected filetype.  Return
      value is the mimetype if mime=True, otherwise a human readable
      name.
  
      >>> magic.from_buffer(open("testdata/test.pdf").read(1024))
      'PDF document, version 1.2'