File: //usr/lib/python3.9/site-packages/redis/commands/graph/__pycache__/node.cpython-39.pyc
a
��b � @ s d dl mZ G dd� d�ZdS )� )�quote_stringc @ s2 e Zd ZdZddd�Zdd� Zdd� Zd d
� ZdS )�Nodez"
A node within the graph.
Nc C s� || _ || _t|t�r$dd� |D �}|du sJ|dksJt|t�rXt|�dkrXd| _d| _nPt|t�rr|| _|g| _n6t|t�r�tdd� |D ��r�|d | _|| _nt d��|p�i | _
dS )z$
Create a new node.
c S s g | ]}|d kr|�qS )� � ��.0Zinner_labelr r �=/usr/lib/python3.9/site-packages/redis/commands/graph/node.py�
<listcomp> � z!Node.__init__.<locals>.<listcomp>Nr � c S s g | ]}t |t��qS r )�
isinstance�strr r r r r r
z8label should be either None, string or a list of strings)�id�aliasr �list�len�label�labelsr
�all�AssertionError�
properties)�selfZnode_idr r r r r r �__init__ s4
���
�
�
�z
Node.__init__c C s<