Is your feature request related to a problem? Please describe.
porting utility from niftynet:
https://github.com/NifTK/NiftyNet/blob/935bf4334cd00fa9f9d50f6a95ddcbfdde4031e0/niftynet/utilities/util_common.py#L249-L256
def look_up_operations(type_str, supported):
"""
This function validates the ``type_str`` against the supported set.
if ``supported`` is a ``set``, returns ``type_str``
if ``supported`` is a ``dict``, return ``supported[type_str]``
else:
raise an error possibly with a guess of the closest match.
"""