We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
p_value_ inconsistency between latent distribution and latent position tests
[after the #336,] latent distribution test has attribute self.p_value_, whereas latent position test has self.p_ . they should be made consistent. specifically, change latent position test to p_value_.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `graspy/inference/base.py`
Content:
```
1 # Copyright 2019 NeuroData (http://neurodata.io)
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 from abc import abstractmethod
16 from sklearn.base import BaseEstimator
17 import numpy as np
18 
19 
20 class BaseInference(BaseEstimator):
21     """
22     Base class for inference tasks such as semiparametric and
23     nonparametric inference tasks.
24 
25     Parameters
26     ----------
27     embedding : { 'ase' (default), 'lse, 'omnibus'}
28         String describing the embedding method to use.
29         Must be one of:
30         'ase'
31             Embed each graph separately using adjacency spectral embedding
32             and use Procrustes to align the embeddings.
33         'omnibus'
34             Embed all graphs simultaneously using omnibus embedding.
35 
36     n_components : None (default), or int
37         Number of embedding dimensions. If None, the optimal embedding
38         dimensions are found by the Zhu and Godsi algorithm.
39     """
40 
41     def __init__(self, embedding="ase", n_components=None):
42         if type(embedding) is not str:
43             raise TypeError("embedding must be str")
44         if (not isinstance(n_components, (int, np.integer))) and (
45             n_components is not None
46         ):
47             raise TypeError("n_components must be int or np.integer")
48         if embedding not in ["ase", "omnibus"]:
49             raise ValueError("{} is not a valid embedding method.".format(embedding))
50         if n_components is not None and n_components <= 0:
51             raise ValueError(
52                 "Cannot embed into {} dimensions, must be greater than 0".format(
53                     n_components
54                 )
55             )
56         self.embedding = embedding
57         self.n_components = n_components
58 
59     @abstractmethod
60     def _bootstrap(self):
61         pass
62 
63     @abstractmethod
64     def _embed(self, X1, X2, n_componets):
65         """
66         Computes the latent positions of input graphs
67 
68         Returns
69         -------
70         X1_hat : array-like, shape (n_vertices, n_components)
71             Estimated latent positions of X1
72         X2_hat : array-like, shape(n_vertices, n_components)
73             Estimated latent positions of X2
74         """
75 
76     @abstractmethod
77     def fit(self, A1, A2):
78         """
79         Compute the test statistic and the null distribution.
80 
81         Parameters
82         ----------
83         X1 : nx.Graph or np.ndarray
84             A graph
85         X2 : nx.Graph or np.ndarray
86             A graph
87         """
88
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/graspy/inference/base.py b/graspy/inference/base.py
--- a/graspy/inference/base.py
+++ b/graspy/inference/base.py
@@ -12,65 +12,54 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import numpy as np
 from abc import abstractmethod
 from sklearn.base import BaseEstimator
-import numpy as np
 
 
 class BaseInference(BaseEstimator):
     """
-    Base class for inference tasks such as semiparametric and
-    nonparametric inference tasks.
+    Base class for inference tasks such as semiparametric latent position test
+    and nonparametric latent distribution test.
 
     Parameters
     ----------
-    embedding : { 'ase' (default), 'lse, 'omnibus'}
-        String describing the embedding method to use.
-        Must be one of:
-        'ase'
-            Embed each graph separately using adjacency spectral embedding
-            and use Procrustes to align the embeddings.
-        'omnibus'
-            Embed all graphs simultaneously using omnibus embedding.
-
     n_components : None (default), or int
         Number of embedding dimensions. If None, the optimal embedding
-        dimensions are found by the Zhu and Godsi algorithm.
+        dimensions are chosen via the Zhu and Godsi algorithm.
     """
 
-    def __init__(self, embedding="ase", n_components=None):
-        if type(embedding) is not str:
-            raise TypeError("embedding must be str")
+    def __init__(self, n_components=None):
         if (not isinstance(n_components, (int, np.integer))) and (
             n_components is not None
         ):
             raise TypeError("n_components must be int or np.integer")
-        if embedding not in ["ase", "omnibus"]:
-            raise ValueError("{} is not a valid embedding method.".format(embedding))
         if n_components is not None and n_components <= 0:
             raise ValueError(
                 "Cannot embed into {} dimensions, must be greater than 0".format(
                     n_components
                 )
             )
-        self.embedding = embedding
         self.n_components = n_components
 
     @abstractmethod
-    def _bootstrap(self):
-        pass
-
-    @abstractmethod
-    def _embed(self, X1, X2, n_componets):
+    def _embed(self, A1, A2, n_componets):
         """
         Computes the latent positions of input graphs
 
+        Parameters
+        ----------
+        A1 : np.ndarray, shape (n_vertices, n_vertices)
+            Adjacency matrix of the first graph
+        A2 : np.ndarray, shape (n_vertices, n_vertices)
+            Adjacency matrix of the second graph
+
         Returns
         -------
         X1_hat : array-like, shape (n_vertices, n_components)
-            Estimated latent positions of X1
+            Estimated latent positions of the vertices in the first graph
         X2_hat : array-like, shape(n_vertices, n_components)
-            Estimated latent positions of X2
+            Estimated latent positions of the vertices in the second graph
         """
 
     @abstractmethod
@@ -80,8 +69,31 @@
 
         Parameters
         ----------
-        X1 : nx.Graph or np.ndarray
-            A graph
-        X2 : nx.Graph or np.ndarray
-            A graph
+        A1, A2 : nx.Graph, nx.DiGraph, nx.MultiDiGraph, nx.MultiGraph, np.ndarray
+            The two graphs to run a hypothesis test on.
+            If np.ndarray, shape must be ``(n_vertices, n_vertices)`` for both
+            graphs, where ``n_vertices`` is the same for both
+
+        Returns
+        ------
+        self
+        """
+        pass
+
+    def fit_predict(self, A1, A2):
+        """
+        Fits the model and returns the p-value
+        Parameters
+        ----------
+        A1, A2 : nx.Graph, nx.DiGraph, nx.MultiDiGraph, nx.MultiGraph, np.ndarray
+            The two graphs to run a hypothesis test on.
+            If np.ndarray, shape must be ``(n_vertices, n_vertices)`` for both
+            graphs, where ``n_vertices`` is the same for both
+
+        Returns
+        ------
+        p_value_ : float
+            The overall p value from the test
         """
+        self.fit(A1, A2)
+        return self.p_value_

{"golden_diff": "diff --git a/graspy/inference/base.py b/graspy/inference/base.py\n--- a/graspy/inference/base.py\n+++ b/graspy/inference/base.py\n@@ -12,65 +12,54 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n+import numpy as np\n from abc import abstractmethod\n from sklearn.base import BaseEstimator\n-import numpy as np\n \n \n class BaseInference(BaseEstimator):\n     \"\"\"\n-    Base class for inference tasks such as semiparametric and\n-    nonparametric inference tasks.\n+    Base class for inference tasks such as semiparametric latent position test\n+    and nonparametric latent distribution test.\n \n     Parameters\n     ----------\n-    embedding : { 'ase' (default), 'lse, 'omnibus'}\n-        String describing the embedding method to use.\n-        Must be one of:\n-        'ase'\n-            Embed each graph separately using adjacency spectral embedding\n-            and use Procrustes to align the embeddings.\n-        'omnibus'\n-            Embed all graphs simultaneously using omnibus embedding.\n-\n     n_components : None (default), or int\n         Number of embedding dimensions. If None, the optimal embedding\n-        dimensions are found by the Zhu and Godsi algorithm.\n+        dimensions are chosen via the Zhu and Godsi algorithm.\n     \"\"\"\n \n-    def __init__(self, embedding=\"ase\", n_components=None):\n-        if type(embedding) is not str:\n-            raise TypeError(\"embedding must be str\")\n+    def __init__(self, n_components=None):\n         if (not isinstance(n_components, (int, np.integer))) and (\n             n_components is not None\n         ):\n             raise TypeError(\"n_components must be int or np.integer\")\n-        if embedding not in [\"ase\", \"omnibus\"]:\n-            raise ValueError(\"{} is not a valid embedding method.\".format(embedding))\n         if n_components is not None and n_components <= 0:\n             raise ValueError(\n                 \"Cannot embed into {} dimensions, must be greater than 0\".format(\n                     n_components\n                 )\n             )\n-        self.embedding = embedding\n         self.n_components = n_components\n \n     @abstractmethod\n-    def _bootstrap(self):\n-        pass\n-\n-    @abstractmethod\n-    def _embed(self, X1, X2, n_componets):\n+    def _embed(self, A1, A2, n_componets):\n         \"\"\"\n         Computes the latent positions of input graphs\n \n+        Parameters\n+        ----------\n+        A1 : np.ndarray, shape (n_vertices, n_vertices)\n+            Adjacency matrix of the first graph\n+        A2 : np.ndarray, shape (n_vertices, n_vertices)\n+            Adjacency matrix of the second graph\n+\n         Returns\n         -------\n         X1_hat : array-like, shape (n_vertices, n_components)\n-            Estimated latent positions of X1\n+            Estimated latent positions of the vertices in the first graph\n         X2_hat : array-like, shape(n_vertices, n_components)\n-            Estimated latent positions of X2\n+            Estimated latent positions of the vertices in the second graph\n         \"\"\"\n \n     @abstractmethod\n@@ -80,8 +69,31 @@\n \n         Parameters\n         ----------\n-        X1 : nx.Graph or np.ndarray\n-            A graph\n-        X2 : nx.Graph or np.ndarray\n-            A graph\n+        A1, A2 : nx.Graph, nx.DiGraph, nx.MultiDiGraph, nx.MultiGraph, np.ndarray\n+            The two graphs to run a hypothesis test on.\n+            If np.ndarray, shape must be ``(n_vertices, n_vertices)`` for both\n+            graphs, where ``n_vertices`` is the same for both\n+\n+        Returns\n+        ------\n+        self\n+        \"\"\"\n+        pass\n+\n+    def fit_predict(self, A1, A2):\n+        \"\"\"\n+        Fits the model and returns the p-value\n+        Parameters\n+        ----------\n+        A1, A2 : nx.Graph, nx.DiGraph, nx.MultiDiGraph, nx.MultiGraph, np.ndarray\n+            The two graphs to run a hypothesis test on.\n+            If np.ndarray, shape must be ``(n_vertices, n_vertices)`` for both\n+            graphs, where ``n_vertices`` is the same for both\n+\n+        Returns\n+        ------\n+        p_value_ : float\n+            The overall p value from the test\n         \"\"\"\n+        self.fit(A1, A2)\n+        return self.p_value_\n", "issue": "p_value_ inconsistency between latent distribution and latent position tests\n[after the #336,] latent distribution test has attribute self.p_value_, whereas latent position test has self.p_ . they should be made consistent. specifically, change latent position test to p_value_.\n", "before_files": [{"content": "# Copyright 2019 NeuroData (http://neurodata.io)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom abc import abstractmethod\nfrom sklearn.base import BaseEstimator\nimport numpy as np\n\n\nclass BaseInference(BaseEstimator):\n    \"\"\"\n    Base class for inference tasks such as semiparametric and\n    nonparametric inference tasks.\n\n    Parameters\n    ----------\n    embedding : { 'ase' (default), 'lse, 'omnibus'}\n        String describing the embedding method to use.\n        Must be one of:\n        'ase'\n            Embed each graph separately using adjacency spectral embedding\n            and use Procrustes to align the embeddings.\n        'omnibus'\n            Embed all graphs simultaneously using omnibus embedding.\n\n    n_components : None (default), or int\n        Number of embedding dimensions. If None, the optimal embedding\n        dimensions are found by the Zhu and Godsi algorithm.\n    \"\"\"\n\n    def __init__(self, embedding=\"ase\", n_components=None):\n        if type(embedding) is not str:\n            raise TypeError(\"embedding must be str\")\n        if (not isinstance(n_components, (int, np.integer))) and (\n            n_components is not None\n        ):\n            raise TypeError(\"n_components must be int or np.integer\")\n        if embedding not in [\"ase\", \"omnibus\"]:\n            raise ValueError(\"{} is not a valid embedding method.\".format(embedding))\n        if n_components is not None and n_components <= 0:\n            raise ValueError(\n                \"Cannot embed into {} dimensions, must be greater than 0\".format(\n                    n_components\n                )\n            )\n        self.embedding = embedding\n        self.n_components = n_components\n\n    @abstractmethod\n    def _bootstrap(self):\n        pass\n\n    @abstractmethod\n    def _embed(self, X1, X2, n_componets):\n        \"\"\"\n        Computes the latent positions of input graphs\n\n        Returns\n        -------\n        X1_hat : array-like, shape (n_vertices, n_components)\n            Estimated latent positions of X1\n        X2_hat : array-like, shape(n_vertices, n_components)\n            Estimated latent positions of X2\n        \"\"\"\n\n    @abstractmethod\n    def fit(self, A1, A2):\n        \"\"\"\n        Compute the test statistic and the null distribution.\n\n        Parameters\n        ----------\n        X1 : nx.Graph or np.ndarray\n            A graph\n        X2 : nx.Graph or np.ndarray\n            A graph\n        \"\"\"\n", "path": "graspy/inference/base.py"}], "after_files": [{"content": "# Copyright 2019 NeuroData (http://neurodata.io)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport numpy as np\nfrom abc import abstractmethod\nfrom sklearn.base import BaseEstimator\n\n\nclass BaseInference(BaseEstimator):\n    \"\"\"\n    Base class for inference tasks such as semiparametric latent position test\n    and nonparametric latent distribution test.\n\n    Parameters\n    ----------\n    n_components : None (default), or int\n        Number of embedding dimensions. If None, the optimal embedding\n        dimensions are chosen via the Zhu and Godsi algorithm.\n    \"\"\"\n\n    def __init__(self, n_components=None):\n        if (not isinstance(n_components, (int, np.integer))) and (\n            n_components is not None\n        ):\n            raise TypeError(\"n_components must be int or np.integer\")\n        if n_components is not None and n_components <= 0:\n            raise ValueError(\n                \"Cannot embed into {} dimensions, must be greater than 0\".format(\n                    n_components\n                )\n            )\n        self.n_components = n_components\n\n    @abstractmethod\n    def _embed(self, A1, A2, n_componets):\n        \"\"\"\n        Computes the latent positions of input graphs\n\n        Parameters\n        ----------\n        A1 : np.ndarray, shape (n_vertices, n_vertices)\n            Adjacency matrix of the first graph\n        A2 : np.ndarray, shape (n_vertices, n_vertices)\n            Adjacency matrix of the second graph\n\n        Returns\n        -------\n        X1_hat : array-like, shape (n_vertices, n_components)\n            Estimated latent positions of the vertices in the first graph\n        X2_hat : array-like, shape(n_vertices, n_components)\n            Estimated latent positions of the vertices in the second graph\n        \"\"\"\n\n    @abstractmethod\n    def fit(self, A1, A2):\n        \"\"\"\n        Compute the test statistic and the null distribution.\n\n        Parameters\n        ----------\n        A1, A2 : nx.Graph, nx.DiGraph, nx.MultiDiGraph, nx.MultiGraph, np.ndarray\n            The two graphs to run a hypothesis test on.\n            If np.ndarray, shape must be ``(n_vertices, n_vertices)`` for both\n            graphs, where ``n_vertices`` is the same for both\n\n        Returns\n        ------\n        self\n        \"\"\"\n        pass\n\n    def fit_predict(self, A1, A2):\n        \"\"\"\n        Fits the model and returns the p-value\n        Parameters\n        ----------\n        A1, A2 : nx.Graph, nx.DiGraph, nx.MultiDiGraph, nx.MultiGraph, np.ndarray\n            The two graphs to run a hypothesis test on.\n            If np.ndarray, shape must be ``(n_vertices, n_vertices)`` for both\n            graphs, where ``n_vertices`` is the same for both\n\n        Returns\n        ------\n        p_value_ : float\n            The overall p value from the test\n        \"\"\"\n        self.fit(A1, A2)\n        return self.p_value_\n", "path": "graspy/inference/base.py"}]}