code: def node2geoff(node_name, properties, encoder):
      
      if properties:
          return '({0} {1})'.format(node_name,
                                    encoder.encode(properties))
      else:
          return '({0})'.format(node_name)
docs: converts a NetworkX node into a Geoff string.
  
      Parameters
      ----------
      node_name : str or int
          the ID of a NetworkX node
      properties : dict
          a dictionary of node attributes
      encoder : json.JSONEncoder
          an instance of a JSON encoder (e.g. `json.JSONEncoder`)
  
      Returns
      -------
      geoff : str
          a Geoff string