def get_targeted_value(value, target):
    """ Given a value that may be scoped by one or more targets, the unscoped
    value is returned if it is being targeted by the given architecture.  If it
    isn't then None is returned.
    """
    parts = value.split('#', maxsplit=1)
    if len(parts) == 2:
        scope, value = parts
        if not target.is_targeted(scope):
            value = None
    return value
