We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add readthedocs documentation for pika instrumentation
Part of [1491](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1491)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py`
Content:
```
1 # Copyright The OpenTelemetry 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 Instrument `pika` to trace RabbitMQ applications.
16 
17 Usage
18 -----
19 
20 * Start broker backend
21 
22 .. code-block:: python
23 
24     docker run -p 5672:5672 rabbitmq
25 
26 * Run instrumented task
27 
28 .. code-block:: python
29 
30     import pika
31     from opentelemetry.instrumentation.pika import PikaInstrumentor
32 
33     PikaInstrumentor().instrument()
34 
35     connection = pika.BlockingConnection(pika.URLParameters('amqp://localhost'))
36     channel = connection.channel()
37     channel.queue_declare(queue='hello')
38     channel.basic_publish(exchange='', routing_key='hello', body=b'Hello World!')
39 
40 * PikaInstrumentor also supports instrumentation of a single channel
41 
42 .. code-block:: python
43 
44     import pika
45     from opentelemetry.instrumentation.pika import PikaInstrumentor
46 
47     connection = pika.BlockingConnection(pika.URLParameters('amqp://localhost'))
48     channel = connection.channel()
49     channel.queue_declare(queue='hello')
50 
51     pika_instrumentation = PikaInstrumentor()
52     pika_instrumentation.instrument_channel(channel=channel)
53 
54 
55     channel.basic_publish(exchange='', routing_key='hello', body=b'Hello World!')
56 
57     pika_instrumentation.uninstrument_channel(channel=channel)
58 
59 * PikaInstrumentor also supports instrumentation without creating an object, and receiving a tracer_provider
60 
61 .. code-block:: python
62 
63     PikaInstrumentor.instrument_channel(channel, tracer_provider=tracer_provider)
64 
65 * PikaInstrumentor also supports instrumenting with hooks that will be called when producing or consuming a message.
66   The hooks should be of type `Callable[[Span, bytes, BasicProperties], None]`
67   where the first parameter is the span, the second parameter is the message body
68   and the third parameter is the message properties
69 
70 .. code-block:: python
71 
72     def publish_hook(span: Span, body: bytes, properties: BasicProperties):
73         span.set_attribute("messaging.payload", body.decode())
74 
75     def consume_hook(span: Span, body: bytes, properties: BasicProperties):
76         span.set_attribute("messaging.id", properties.message_id)
77 
78     PikaInstrumentor.instrument_channel(channel, publish_hook=publish_hook, consume_hook=consume_hook)
79 
80 API
81 ---
82 """
83 # pylint: disable=import-error
84 
85 from .pika_instrumentor import PikaInstrumentor
86 from .version import __version__
87 
88 __all__ = ["PikaInstrumentor", "__version__"]
89
```
--- 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/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py b/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py
--- a/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 """
-Instrument `pika` to trace RabbitMQ applications.
+Instrument pika to trace RabbitMQ applications.
 
 Usage
 -----
@@ -63,7 +63,7 @@
     PikaInstrumentor.instrument_channel(channel, tracer_provider=tracer_provider)
 
 * PikaInstrumentor also supports instrumenting with hooks that will be called when producing or consuming a message.
-  The hooks should be of type `Callable[[Span, bytes, BasicProperties], None]`
+  The hooks should be of type "Callable[[Span, bytes, BasicProperties], None]"
   where the first parameter is the span, the second parameter is the message body
   and the third parameter is the message properties

{"golden_diff": "diff --git a/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py b/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py\n--- a/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py\n+++ b/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py\n@@ -12,7 +12,7 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \"\"\"\n-Instrument `pika` to trace RabbitMQ applications.\n+Instrument pika to trace RabbitMQ applications.\n \n Usage\n -----\n@@ -63,7 +63,7 @@\n     PikaInstrumentor.instrument_channel(channel, tracer_provider=tracer_provider)\n \n * PikaInstrumentor also supports instrumenting with hooks that will be called when producing or consuming a message.\n-  The hooks should be of type `Callable[[Span, bytes, BasicProperties], None]`\n+  The hooks should be of type \"Callable[[Span, bytes, BasicProperties], None]\"\n   where the first parameter is the span, the second parameter is the message body\n   and the third parameter is the message properties\n", "issue": "Add readthedocs documentation for pika instrumentation\nPart of [1491](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1491)\n", "before_files": [{"content": "# Copyright The OpenTelemetry 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\"\"\"\nInstrument `pika` to trace RabbitMQ applications.\n\nUsage\n-----\n\n* Start broker backend\n\n.. code-block:: python\n\n    docker run -p 5672:5672 rabbitmq\n\n* Run instrumented task\n\n.. code-block:: python\n\n    import pika\n    from opentelemetry.instrumentation.pika import PikaInstrumentor\n\n    PikaInstrumentor().instrument()\n\n    connection = pika.BlockingConnection(pika.URLParameters('amqp://localhost'))\n    channel = connection.channel()\n    channel.queue_declare(queue='hello')\n    channel.basic_publish(exchange='', routing_key='hello', body=b'Hello World!')\n\n* PikaInstrumentor also supports instrumentation of a single channel\n\n.. code-block:: python\n\n    import pika\n    from opentelemetry.instrumentation.pika import PikaInstrumentor\n\n    connection = pika.BlockingConnection(pika.URLParameters('amqp://localhost'))\n    channel = connection.channel()\n    channel.queue_declare(queue='hello')\n\n    pika_instrumentation = PikaInstrumentor()\n    pika_instrumentation.instrument_channel(channel=channel)\n\n\n    channel.basic_publish(exchange='', routing_key='hello', body=b'Hello World!')\n\n    pika_instrumentation.uninstrument_channel(channel=channel)\n\n* PikaInstrumentor also supports instrumentation without creating an object, and receiving a tracer_provider\n\n.. code-block:: python\n\n    PikaInstrumentor.instrument_channel(channel, tracer_provider=tracer_provider)\n\n* PikaInstrumentor also supports instrumenting with hooks that will be called when producing or consuming a message.\n  The hooks should be of type `Callable[[Span, bytes, BasicProperties], None]`\n  where the first parameter is the span, the second parameter is the message body\n  and the third parameter is the message properties\n\n.. code-block:: python\n\n    def publish_hook(span: Span, body: bytes, properties: BasicProperties):\n        span.set_attribute(\"messaging.payload\", body.decode())\n\n    def consume_hook(span: Span, body: bytes, properties: BasicProperties):\n        span.set_attribute(\"messaging.id\", properties.message_id)\n\n    PikaInstrumentor.instrument_channel(channel, publish_hook=publish_hook, consume_hook=consume_hook)\n\nAPI\n---\n\"\"\"\n# pylint: disable=import-error\n\nfrom .pika_instrumentor import PikaInstrumentor\nfrom .version import __version__\n\n__all__ = [\"PikaInstrumentor\", \"__version__\"]\n", "path": "instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py"}], "after_files": [{"content": "# Copyright The OpenTelemetry 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\"\"\"\nInstrument pika to trace RabbitMQ applications.\n\nUsage\n-----\n\n* Start broker backend\n\n.. code-block:: python\n\n    docker run -p 5672:5672 rabbitmq\n\n* Run instrumented task\n\n.. code-block:: python\n\n    import pika\n    from opentelemetry.instrumentation.pika import PikaInstrumentor\n\n    PikaInstrumentor().instrument()\n\n    connection = pika.BlockingConnection(pika.URLParameters('amqp://localhost'))\n    channel = connection.channel()\n    channel.queue_declare(queue='hello')\n    channel.basic_publish(exchange='', routing_key='hello', body=b'Hello World!')\n\n* PikaInstrumentor also supports instrumentation of a single channel\n\n.. code-block:: python\n\n    import pika\n    from opentelemetry.instrumentation.pika import PikaInstrumentor\n\n    connection = pika.BlockingConnection(pika.URLParameters('amqp://localhost'))\n    channel = connection.channel()\n    channel.queue_declare(queue='hello')\n\n    pika_instrumentation = PikaInstrumentor()\n    pika_instrumentation.instrument_channel(channel=channel)\n\n\n    channel.basic_publish(exchange='', routing_key='hello', body=b'Hello World!')\n\n    pika_instrumentation.uninstrument_channel(channel=channel)\n\n* PikaInstrumentor also supports instrumentation without creating an object, and receiving a tracer_provider\n\n.. code-block:: python\n\n    PikaInstrumentor.instrument_channel(channel, tracer_provider=tracer_provider)\n\n* PikaInstrumentor also supports instrumenting with hooks that will be called when producing or consuming a message.\n  The hooks should be of type \"Callable[[Span, bytes, BasicProperties], None]\"\n  where the first parameter is the span, the second parameter is the message body\n  and the third parameter is the message properties\n\n.. code-block:: python\n\n    def publish_hook(span: Span, body: bytes, properties: BasicProperties):\n        span.set_attribute(\"messaging.payload\", body.decode())\n\n    def consume_hook(span: Span, body: bytes, properties: BasicProperties):\n        span.set_attribute(\"messaging.id\", properties.message_id)\n\n    PikaInstrumentor.instrument_channel(channel, publish_hook=publish_hook, consume_hook=consume_hook)\n\nAPI\n---\n\"\"\"\n# pylint: disable=import-error\n\nfrom .pika_instrumentor import PikaInstrumentor\nfrom .version import __version__\n\n__all__ = [\"PikaInstrumentor\", \"__version__\"]\n", "path": "instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py"}]}