def create_analysisrequest(container, **data):
container = get_object(container)<EOL>request = req.get_request()<EOL>sample_type = data.get("<STR_LIT>", None)<EOL>if sample_type is None:<EOL><INDENT>fail(<NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>results = search(portal_type="<STR_LIT>", title=sample_type)<EOL>values = {<EOL>"<STR_LIT>": data.get("<STR_LIT>", []),<EOL>"<STR_LIT>": results and get_object(results[<NUM_LIT:0>]) or None,<EOL>}<EOL>return create_ar(container, request, values)<EOL>
Create a minimun viable AnalysisRequest

    :param container: A single folderish catalog brain or content object
    :type container: ATContentType/DexterityContentType/CatalogBrain