def expanded_ref_query_for_ref(oref: Ref): return [{ 'expanded_refs': { '$regex': r } } for r in oref.regex(as_list=True)]