'Create a new NodeData object from deserialised data.
This reads the format that is stored in the database, and is the
inverse of as_dict().'

@classmethod
def from_dict(cls, node_data):

    if isinstance(node_data, cls):
        return node_data
    return cls(node_data.get('id'), node_data.get('name'), node_data.get('uuid'), node_data.get('reference_id'), node_data.get('attrs', {}), node_data.get('action'), node_data.get('status'))
