def set_metadata_for(name, metadata):
    """I replace any existing metadata for the named child with the new
        metadata. The child name must be a unicode string. This metadata is
        stored in the *edge*, not in the child, so it is attached to the
        parent dirnode rather than the child node. I return a Deferred
        (that fires with this dirnode) when the operation is complete.
        I raise NoSuchChildError if I do not have a child by that name."""
