def METHOD_NAME(dict_or_value):
    # A string here represents a generic target (like x86_64 or ppc64) or
    # a custom micro-architecture
    if isinstance(dict_or_value, str):
        return Target(dict_or_value)
    # TODO: From a dict we actually retrieve much more information than
    # TODO: just the name. We can use that information to reconstruct an
    # TODO: "old" micro-architecture or check the current definition.
    target_info = dict_or_value
    return Target(target_info["name"])