def filter_own_experiment(slice_iden):
    filtered_exp = None
    try:
        # Check that experiment contains the keywords
        # to verify it was CREATED at our island.
        # Otherwise, leave
        filtered_exp = Experiment.objects.get(slice_id = slice_iden['id'])
        for keyword in slice_iden['keywords']:
            if keyword not in filtered_exp.slice_name:
                filtered_exp = None   # If this does not exist, ignore
                break
    except Exception as e:
        print "Could not find opted experiment %s. Details: %s" % (str(slice_iden['id']), str(e))
    return filtered_exp
dataset/ETHPy150Open fp7-ofelia/ocf/optin_manager/src/python/openflow/optin_manager/opts/autofsgranter.py/filter_own_experiment/original