def find_analyses(ar_or_sample):
    """ This function is used to find keywords that are not on the analysis
        but keywords that are on the interim fields.

        This function and is is_keyword function should probably be in
        resultsimport.py or somewhere central where it can be used by other
        instrument interfaces.
    """
    bc = api.get_tool(CATALOG_ANALYSIS_REQUEST_LISTING)
    ar = bc(portal_type='AnalysisRequest', id=ar_or_sample)
    if len(ar) == 0:
        ar = bc(portal_type='AnalysisRequest', getClientSampleID=ar_or_sample)
    if len(ar) == 1:
        obj = ar[0].getObject()
        analyses = obj.getAnalyses(full_objects=True)
        return analyses
    return []
def find_analyses ( ar_or_sample ) : bc = api . get_tool ( CATALOG_ANALYSIS_REQUEST_LISTING ) ar = bc ( portal_type = 'AnalysisRequest' , id = ar_or_sample ) if len ( ar ) == 0 : ar = bc ( portal_type = 'AnalysisRequest' , getClientSampleID = ar_or_sample ) if len ( ar ) == 1 : obj = ar [ 0 ] . getObject ( ) analyses = obj . getAnalyses ( full_objects = True ) return analyses return [ ]
This function is used to find keywords that are not on the analysis
        but keywords that are on the interim fields.

        This function and is is_keyword function should probably be in
        resultsimport.py or somewhere central where it can be used by other
        instrument interfaces.