code: def getAcceptable(accept_header, have_types):
      
      accepted = parseAcceptHeader(accept_header)
      preferred = matchTypes(accepted, have_types)
      return [mtype for (mtype, _) in preferred]
docs: Parse the accept header and return a list of available types in
      preferred order. If a type is unacceptable, it will not be in the
      resulting list.
  
      This is a convenience wrapper around matchTypes and
      parseAcceptHeader.
  
      (str, [str]) -> [str]