code: def traverse(self, startVertex, **kwargs) :
          
  
          url = "%s/traversal" % self.database.URL
          if type(startVertex) is DOC.Document :
              startVertex_id = startVertex._id
          else :
              startVertex_id = startVertex
  
          payload = {"startVertex": startVertex_id, "graphName" : self.name}
          if "expander" in kwargs :
              if "direction" in kwargs :
                      raise ValueError("""The function can't have both 'direction' and 'expander' as arguments""") 
          elif "direction" not in kwargs :
              raise ValueError("""The function must have as argument either: direction = "outbout"/"any"/"inbound" or expander = "custom JS (see arangodb's doc)" """) 
  
          payload.update(kwargs)
  
          r = self.connection.session.post(url, data = json.dumps(payload, default=str))
          data = r.json()
          if r.status_code < 200 or r.status_code > 202 or data["error"] :
              raise TraversalError(data["errorMessage"], data)
  
          return data["result"]
docs: Traversal! see: https://docs.arangodb.com/HttpTraversal/README.html for a full list of the possible kwargs.
          The function must have as argument either: direction = "outbout"/"any"/"inbound" or expander = "custom JS (see arangodb's doc)".
          The function can't have both 'direction' and 'expander' as arguments.