<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_property(node_uri, property_name, property_value, ossos_base=True):
 """ Sets the value of a property on a node in VOSpace. If the property already has a value then it is first cleared and then set. @param node_uri: @param property_name: @param property_value: @param ossos_base: @return: """

    node = client.get_node(node_uri)
    property_uri = tag_uri(property_name) if ossos_base else property_name

    # If there is an existing value, clear it first
    if property_uri in node.props:
        node.props[property_uri] = None
        client.add_props(node)

    node.props[property_uri] = property_value
    client.add_props(node)