def METHOD_NAME(db, minimal_record, recid_pid):
    """"Test type."""
    minimal_record.update({
        'resource_type': {'type': 'publication', 'subtype': 'thesis'}
    })
    obj = csl_v1.transform_record(recid_pid, Record(minimal_record))
    assert obj['type'] == 'thesis'
    minimal_record.update({
        'resource_type': {'type': 'publication'}
    })
    obj = csl_v1.transform_record(recid_pid, Record(minimal_record))
    assert obj['type'] == 'article'
    minimal_record.update({
        'resource_type': {'type': 'image'}
    })
    obj = csl_v1.transform_record(recid_pid, Record(minimal_record))
    assert obj['type'] == 'graphic'