Repository: networkx/networkx

Issue:
Document walk_type in directed_laplacian and friends
The current documentation of the "walk_type" argument to the many directed laplacian matrix approaches is opaque. And the logic is hidden within the actual code because it occurs in a helper function presumably so the logic is the same for all these functions. The logic should be fairly straightforward to explain. For the directed graph case it is given in `linalg.laplacianmatrix._transition_matrix` as
```python
    if walk_type is None:
        if nx.is_strongly_connected(G):
            if nx.is_aperiodic(G):
                walk_type = "random"
            else:
                walk_type = "lazy"
        else:
            walk_type = "pagerank"
```
We should put a word description of this into the `walk_type` parameter description..



Discussion:
I want to work on this issue. Kindly assign me this issue.

You may submit a PR or a comment here if you have further questions. 
We are small enough that we don't assign PRs. :)
Thanks!!

Resolving patch:
diff --git a/networkx/algorithms/centrality/laplacian.py b/networkx/algorithms/centrality/laplacian.py
--- a/networkx/algorithms/centrality/laplacian.py
+++ b/networkx/algorithms/centrality/laplacian.py
@@ -50,8 +50,11 @@ def laplacian_centrality(
     walk_type : string or None, optional (default=None)
         Optional parameter `walk_type` used when calling
         :func:`directed_laplacian_matrix <networkx.directed_laplacian_matrix>`.
-        If None, the transition matrix is selected depending on the properties
-        of the graph. Otherwise can be `random`, `lazy`, or `pagerank`.
+        One of ``"random"``, ``"lazy"``, or ``"pagerank"``. If ``walk_type=None``
+        (the default), then a value is selected according to the properties of `G`:
+        - ``walk_type="random"`` if `G` is strongly connected and aperiodic
+        - ``walk_type="lazy"`` if `G` is strongly connected but not aperiodic
+        - ``walk_type="pagerank"`` for all other cases.
 
     alpha : real (default = 0.95)
         Optional parameter `alpha` used when calling
diff --git a/networkx/linalg/laplacianmatrix.py b/networkx/linalg/laplacianmatrix.py
--- a/networkx/linalg/laplacianmatrix.py
+++ b/networkx/linalg/laplacianmatrix.py
@@ -219,8 +219,11 @@ def directed_laplacian_matrix(
        If None, then each edge has weight 1.
 
     walk_type : string or None, optional (default=None)
-       If None, `P` is selected depending on the properties of the
-       graph. Otherwise is one of 'random', 'lazy', or 'pagerank'
+       One of ``"random"``, ``"lazy"``, or ``"pagerank"``. If ``walk_type=None``
+       (the default), then a value is selected according to the properties of `G`:
+       - ``walk_type="random"`` if `G` is strongly connected and aperiodic
+       - ``walk_type="lazy"`` if `G` is strongly connected but not aperiodic
+       - ``walk_type="pagerank"`` for all other cases.
 
     alpha : real
        (1 - alpha) is the teleportation probability used with pagerank
@@ -307,8 +310,11 @@ def directed_combinatorial_laplacian_matrix(
        If None, then each edge has weight 1.
 
     walk_type : string or None, optional (default=None)
-       If None, `P` is selected depending on the properties of the
-       graph. Otherwise is one of 'random', 'lazy', or 'pagerank'
+        One of ``"random"``, ``"lazy"``, or ``"pagerank"``. If ``walk_type=None``
+        (the default), then a value is selected according to the properties of `G`:
+        - ``walk_type="random"`` if `G` is strongly connected and aperiodic
+        - ``walk_type="lazy"`` if `G` is strongly connected but not aperiodic
+        - ``walk_type="pagerank"`` for all other cases.
 
     alpha : real
        (1 - alpha) is the teleportation probability used with pagerank
@@ -372,8 +378,11 @@ def _transition_matrix(G, nodelist=None, weight="weight", walk_type=None, alpha=
        If None, then each edge has weight 1.
 
     walk_type : string or None, optional (default=None)
-       If None, `P` is selected depending on the properties of the
-       graph. Otherwise is one of 'random', 'lazy', or 'pagerank'
+       One of ``"random"``, ``"lazy"``, or ``"pagerank"``. If ``walk_type=None``
+       (the default), then a value is selected according to the properties of `G`:
+        - ``walk_type="random"`` if `G` is strongly connected and aperiodic
+        - ``walk_type="lazy"`` if `G` is strongly connected but not aperiodic
+        - ``walk_type="pagerank"`` for all other cases.
 
     alpha : real
        (1 - alpha) is the teleportation probability used with pagerank


Test patch: