code: def _rel_helper(lhs, rhs, ident=None, relation_type=None, direction=None, relation_properties=None, **kwargs):
      
  
      if direction == OUTGOING:
          stmt = '-{0}->'
      elif direction == INCOMING:
          stmt = '<-{0}-'
      else:
          stmt = '-{0}-'
  
      rel_props = ''
  
      if relation_properties:
          rel_props = ' {{{0}}}'.format(', '.join(
              ['{0}: {1}'.format(key, value) for key, value in relation_properties.items()]))
  
      # direct, relation_type=None is unspecified, relation_type
      if relation_type is None:
          stmt = stmt.format('')
      # all("*" wildcard) relation_type
      elif relation_type == '*':
          stmt = stmt.format('[*]')
      else:
          # explicit relation_type
          stmt = stmt.format('[{0}:`{1}`{2}]'.format(ident if ident else '', relation_type, rel_props))
  
      return "({0}){1}({2})".format(lhs, stmt, rhs)
docs: 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