prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  ncon_interface tests fail 
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `conftest.py`
  Content:
  ```
  1 # Copyright 2019 The TensorNetwork Authors
  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 __future__ import absolute_import
  16 from __future__ import division
  17 from __future__ import print_function
  18 import pytest
  19 
  20 
  21 @pytest.fixture(name="backend", params=["numpy", "tensorflow",
  22                                         "jax", "pytorch"])
  23 def backend_fixure(request):
  24   return request.param
  25
  ```
  
  Path: `tensornetwork/__init__.py`
  Content:
  ```
  1 from __future__ import absolute_import
  2 from tensornetwork.network import TensorNetwork
  3 from tensornetwork.network_components import Node, Edge, CopyNode
  4 from tensornetwork.ncon_interface import ncon, ncon_network
  5 from tensornetwork.version import __version__
  6 from tensornetwork.visualization.graphviz import to_graphviz
  7 from tensornetwork import contractors
  8 from tensornetwork import config
  9 from typing import Text, Optional, Type
  10 from tensornetwork.utils import load
  11 
  12 
  13 def set_default_backend(backend: Text, dtype: Optional[Type] = None) -> None:
  14   config.default_backend = backend
  15   config.default_dype = dtype
  16
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/conftest.py b/conftest.py
  --- a/conftest.py
  +++ b/conftest.py
  @@ -16,9 +16,33 @@
   from __future__ import division
   from __future__ import print_function
   import pytest
  +import jax
  +import tensornetwork
  +import tensorflow as tf
   
   
   @pytest.fixture(name="backend", params=["numpy", "tensorflow",
                                           "jax", "pytorch"])
   def backend_fixure(request):
     return request.param
  +
  +
  +@pytest.fixture(autouse=True)
  +def reset_default_backend():
  +  tensornetwork.set_default_backend("numpy")
  +  yield
  +  tensornetwork.set_default_backend("numpy")
  +
  +
  +@pytest.fixture(autouse=True)
  +def enable_jax_64():
  +  jax.config.update("jax_enable_x64", True)
  +  yield
  +  jax.config.update("jax_enable_x64", True)
  +
  +
  +@pytest.fixture(autouse=True)
  +def tf_enable_v2_behaviour():
  +  tf.compat.v1.enable_v2_behavior()
  +  yield
  +  tf.compat.v1.enable_v2_behavior()
  diff --git a/tensornetwork/__init__.py b/tensornetwork/__init__.py
  --- a/tensornetwork/__init__.py
  +++ b/tensornetwork/__init__.py
  @@ -12,4 +12,4 @@
   
   def set_default_backend(backend: Text, dtype: Optional[Type] = None) -> None:
     config.default_backend = backend
  -  config.default_dype = dtype
  +  config.default_dtype = dtype
  
verification_info: {"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -16,9 +16,33 @@\n from __future__ import division\n from __future__ import print_function\n import pytest\n+import jax\n+import tensornetwork\n+import tensorflow as tf\n \n \n @pytest.fixture(name=\"backend\", params=[\"numpy\", \"tensorflow\",\n                                         \"jax\", \"pytorch\"])\n def backend_fixure(request):\n   return request.param\n+\n+\n+@pytest.fixture(autouse=True)\n+def reset_default_backend():\n+  tensornetwork.set_default_backend(\"numpy\")\n+  yield\n+  tensornetwork.set_default_backend(\"numpy\")\n+\n+\n+@pytest.fixture(autouse=True)\n+def enable_jax_64():\n+  jax.config.update(\"jax_enable_x64\", True)\n+  yield\n+  jax.config.update(\"jax_enable_x64\", True)\n+\n+\n+@pytest.fixture(autouse=True)\n+def tf_enable_v2_behaviour():\n+  tf.compat.v1.enable_v2_behavior()\n+  yield\n+  tf.compat.v1.enable_v2_behavior()\ndiff --git a/tensornetwork/__init__.py b/tensornetwork/__init__.py\n--- a/tensornetwork/__init__.py\n+++ b/tensornetwork/__init__.py\n@@ -12,4 +12,4 @@\n \n def set_default_backend(backend: Text, dtype: Optional[Type] = None) -> None:\n   config.default_backend = backend\n-  config.default_dype = dtype\n+  config.default_dtype = dtype\n", "issue": "ncon_interface tests fail \n\n", "before_files": [{"content": "# Copyright 2019 The TensorNetwork Authors\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 __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport pytest\n\n\n@pytest.fixture(name=\"backend\", params=[\"numpy\", \"tensorflow\",\n                                        \"jax\", \"pytorch\"])\ndef backend_fixure(request):\n  return request.param\n", "path": "conftest.py"}, {"content": "from __future__ import absolute_import\nfrom tensornetwork.network import TensorNetwork\nfrom tensornetwork.network_components import Node, Edge, CopyNode\nfrom tensornetwork.ncon_interface import ncon, ncon_network\nfrom tensornetwork.version import __version__\nfrom tensornetwork.visualization.graphviz import to_graphviz\nfrom tensornetwork import contractors\nfrom tensornetwork import config\nfrom typing import Text, Optional, Type\nfrom tensornetwork.utils import load\n\n\ndef set_default_backend(backend: Text, dtype: Optional[Type] = None) -> None:\n  config.default_backend = backend\n  config.default_dype = dtype\n", "path": "tensornetwork/__init__.py"}], "after_files": [{"content": "# Copyright 2019 The TensorNetwork Authors\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 __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport pytest\nimport jax\nimport tensornetwork\nimport tensorflow as tf\n\n\n@pytest.fixture(name=\"backend\", params=[\"numpy\", \"tensorflow\",\n                                        \"jax\", \"pytorch\"])\ndef backend_fixure(request):\n  return request.param\n\n\n@pytest.fixture(autouse=True)\ndef reset_default_backend():\n  tensornetwork.set_default_backend(\"numpy\")\n  yield\n  tensornetwork.set_default_backend(\"numpy\")\n\n\n@pytest.fixture(autouse=True)\ndef enable_jax_64():\n  jax.config.update(\"jax_enable_x64\", True)\n  yield\n  jax.config.update(\"jax_enable_x64\", True)\n\n\n@pytest.fixture(autouse=True)\ndef tf_enable_v2_behaviour():\n  tf.compat.v1.enable_v2_behavior()\n  yield\n  tf.compat.v1.enable_v2_behavior()\n", "path": "conftest.py"}, {"content": "from __future__ import absolute_import\nfrom tensornetwork.network import TensorNetwork\nfrom tensornetwork.network_components import Node, Edge, CopyNode\nfrom tensornetwork.ncon_interface import ncon, ncon_network\nfrom tensornetwork.version import __version__\nfrom tensornetwork.visualization.graphviz import to_graphviz\nfrom tensornetwork import contractors\nfrom tensornetwork import config\nfrom typing import Text, Optional, Type\nfrom tensornetwork.utils import load\n\n\ndef set_default_backend(backend: Text, dtype: Optional[Type] = None) -> None:\n  config.default_backend = backend\n  config.default_dtype = dtype\n", "path": "tensornetwork/__init__.py"}]}