def _rel_helper(lhs, rhs, ident=None, relation_type=None, direction=None, relation_properties=None, **kwargs):
if direction == OUTGOING:<EOL><INDENT>stmt = '<STR_LIT>'<EOL><DEDENT>elif direction == INCOMING:<EOL><INDENT>stmt = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>stmt = '<STR_LIT>'<EOL><DEDENT>rel_props = '<STR_LIT>'<EOL>if relation_properties:<EOL><INDENT>rel_props = '<STR_LIT>'.format('<STR_LIT:U+002CU+0020>'.join(<EOL>['<STR_LIT>'.format(key, value) for key, value in relation_properties.items()]))<EOL><DEDENT>if relation_type is None:<EOL><INDENT>stmt = stmt.format('<STR_LIT>')<EOL><DEDENT>elif relation_type == '<STR_LIT:*>':<EOL><INDENT>stmt = stmt.format('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>stmt = stmt.format('<STR_LIT>'.format(ident if ident else '<STR_LIT>', relation_type, rel_props))<EOL><DEDENT>return "<STR_LIT>".format(lhs, stmt, rhs)<EOL>
Generate a relationship matching string, with specified parameters.
Examples:
relation_direction = OUTGOING: (lhs)-[relation_ident:relation_type]->(rhs)
relation_direction = INCOMING: (lhs)<-[relation_ident:relation_type]-(rhs)
relation_direction = EITHER: (lhs)-[relation_ident:relation_type]-(rhs)

:param lhs: The left hand statement.
:type lhs: str
:param rhs: The right hand statement.
:type rhs: str
:param ident: A specific identity to name the relationship, or None.
:type ident: str
:param relation_type: None for all direct rels, * for all of any length, or a name of an explicit rel.
:type relation_type: str
:param direction: None or EITHER for all OUTGOING,INCOMING,EITHER. Otherwise OUTGOING or INCOMING.
:param relation_properties: dictionary of relationship properties to match
:returns: string