def METHOD_NAME(value, attr):
    # If the data value has an _impl attribute, invoke it.
    # This will manifest any impl-specific attributes.
    impl = getattr(value, attr, None)
    try:
        return impl._impl
    except AttributeError:
        return impl