def get_attribute(node_id, runtime_property, deployment_id, rest_client):
    """ Get a runtime property for the first node instance of a node in
    a deployment.
    :param node_id: The ID of a node template in a deployment.
    :type node_id: str
    :param runtime_property: The key of a runtime property.
    :type runtime_property: str
    :param deployment_id: A Cloudify Deployment ID.
    :type deployment_id: str
    :param rest_client: A Cloudify REST client.
    :type rest_client: cloudify_rest_client.client.CloudifyClient
    :return: The runtime property value.
    :rtype: Any JSON serializable type.
    """
    for node_instance in rest_client.node_instances.list(node_id=node_id):
        if node_instance.deployment_id != deployment_id:
            continue
        return node_instance.runtime_properties.get(runtime_property)