I just added the EVALUATION.RE case to the existing code, so I guessed that the matches were intentionally checking the resource element to fall into one of the types. We might keep that using

            if (SOURCE_RE.match(resource['resource']) or DATASET_RE.match(resource['resource']) or
                MODEL_RE.match(resource['resource']) or EVALUATION_RE.match(resource['resource']):
                out.write("%s (%s bytes)\n" % (resource['object']['name'],
                                                              resource['object']['size']))
            elif PREDICTION_RE.match(resource['resource']):
                   ...

and resource['object'] existence is checked before entering this if.