We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add README to style_guide directory
We are starting to have a range of helpful documents in our `jwql/style_guide` directory - the general style guide. This is great!

I am thinking it would now be helpful to include a `README.md` file in there, so that any prospective user who looks there is met with some information about what resources are available.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `jwql/utils/monitor_template.py`
Content:
```
1 #! /usr/bin/env python
2 
3 """
4 This module is intended to be a template to aid in creating new
5 monitoring scripts and to demonstrate how to format them to fully
6 utilize the ``jwql`` framework.
7 
8 Each monitoring script must be executable from the command line (i.e.
9 have a ``if '__name__' == '__main__' section), as well as have a "main"
10 function that calls all other functions, methods, or modules (i.e.
11 the entirety of the code is executed within the scope of the main
12 function), as shown in this example.
13 
14 Users may utilize the ``jwql`` framework functions for logging,
15 setting permissions, parsing filenames, etc. (See related ``import``s).
16 
17 Authors
18 -------
19 
20     - Catherine Martlin
21     - Matthew Bourque
22 
23 Use
24 ---
25 
26     This module can be executed from the command line:
27     ::
28 
29         python monitor_template.py
30 
31     Alternatively, it can be called from a python environment via the
32     following import statements:
33     ::
34 
35       from monitor_template import main_monitor_function
36       from monitor_template import secondary_function
37 
38 Dependencies
39 ------------
40 
41     The user must have a configuration file named ``config.json``
42     placed in the ``utils`` directory.
43 
44 Notes
45 -----
46 
47     Any monitoring script written for ``jwql`` must adhere to the
48     ``jwql`` style guide located at:
49     https://github.com/spacetelescope/jwql/blob/master/style_guide/style_guide.md
50 """
51 
52 import os
53 import logging
54 
55 from astroquery.mast import Mast
56 from jwst import datamodels
57 from bokeh.charts import Donut
58 from bokeh.embed import components
59 
60 # Functions for logging
61 from jwql.logging.logging_functions import configure_logging
62 from jwql.logging.logging_functions import log_info
63 from jwql.logging.logging_functions import log_fail
64 
65 # Function for setting permissions of files/directories
66 from jwql.permissions.permissions import set_permissions
67 
68 # Function for parsing filenames
69 from jwql.utils.utils import filename_parser
70 
71 # Objects for hard-coded information
72 from jwql.utils.utils import get_config
73 from jwql.utils.constants import JWST_DATAPRODUCTS, JWST_INSTRUMENT_NAMES
74 
75 
76 @log_fail
77 @log_info
78 def monitor_template_main():
79     """ The main function of the ``monitor_template`` module."""
80 
81     # Example of logging
82     my_variable = 'foo'
83     logging.info('Some useful information: {}'.format(my_variable))
84 
85     # Example of querying for a dataset via MAST API
86     service = "Mast.Jwst.Filtered.Niriss"
87     params = {"columns": "filename",
88               "filters": [{"paramName": "filter",
89                           "values": ['F430M']}]}
90     response = Mast.service_request_async(service, params)
91     result = response[0].json()['data']
92     filename_of_interest = result[0]['filename']  # jw00304002001_02102_00001_nis_uncal.fits
93 
94     # Example of parsing a filename
95     filename_dict = filename_parser(filename_of_interest)
96     # Contents of filename_dict:
97     #     {'program_id': '00304',
98     #      'observation': '002',
99     #      'visit': '001',
100     #      'visit_group': '02',
101     #      'parallel_seq_id': '1',
102     #      'activity': '02',
103     #      'exposure_id': '00001',
104     #      'detector': 'nis',
105     #      'suffix': 'uncal'}
106 
107     # Example of locating a dataset in the filesystem
108     filesystem = get_config()['filesystem']
109     dataset = os.path.join(filesystem, 'jw{}'.format(filename_dict['program_id']),
110                            filename_of_interest)
111 
112     # Example of reading in dataset using jwst.datamodels
113     im = datamodels.open(dataset)
114     # Now have access to:
115     #     im.data  # Data array
116     #     im.err  # ERR array
117     #     im.meta  # Metadata such as header keywords
118 
119     # Example of saving a file and setting permissions
120     im.save('some_filename.fits')
121     set_permissions('some_filename.fits')
122 
123     # Example of creating and exporting a Bokeh plot
124     plt = Donut(im.data, plot_width=600, plot_height=600)
125     plt.sizing_mode = 'stretch_both'  # Necessary for responsive sizing on web app
126     script, div = components(plt)
127 
128     plot_output_dir = get_config()['outputs']
129     div_outfile = os.path.join(plot_output_dir, 'monitor_name',
130                                filename_of_interest + "_component.html")
131     script_outfile = os.path.join(plot_output_dir, 'monitor_name',
132                                   filename_of_interest + "_component.js")
133 
134     for outfile, component in zip([div_outfile, script_outfile], [div, script]):
135         with open(outfile, 'w') as f:
136             f.write(component)
137             f.close()
138         set_permissions(outfile)
139 
140     # Perform any other necessary code
141     well_named_variable = "Function does something."
142     result_of_second_function = second_function(well_named_variable)
143 
144 
145 def second_function(input_value):
146     """ This is your axiliary function; you may have many of these.
147 
148     Parameters
149     ----------
150     input_value : str
151         Some value to modify in the function.
152 
153     Returns
154     -------
155     useful_result : str
156         The result of modifying the input value.
157     """
158 
159     # Begin logging:
160     logging.info(" ")
161     logging.info("The auxiliary function has started running.")
162 
163     # Example function:
164     useful_result = input_value + " The other function did something, too."
165 
166     logging.info("The auxiliary function is returning: ")
167     logging.info(useful_result)
168     logging.info(" ")
169 
170     return useful_result
171 
172 
173 if __name__ == '__main__':
174 
175     # Configure logging
176     module = os.path.basename(__file__).strip('.py')
177     configure_logging(module)
178 
179     # Call the main function
180     monitor_template_main()
181
```
--- 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/jwql/utils/monitor_template.py b/jwql/utils/monitor_template.py
--- a/jwql/utils/monitor_template.py
+++ b/jwql/utils/monitor_template.py
@@ -46,7 +46,7 @@
 
     Any monitoring script written for ``jwql`` must adhere to the
     ``jwql`` style guide located at:
-    https://github.com/spacetelescope/jwql/blob/master/style_guide/style_guide.md
+    https://github.com/spacetelescope/jwql/blob/master/style_guide/README.md
 """
 
 import os

{"golden_diff": "diff --git a/jwql/utils/monitor_template.py b/jwql/utils/monitor_template.py\n--- a/jwql/utils/monitor_template.py\n+++ b/jwql/utils/monitor_template.py\n@@ -46,7 +46,7 @@\n \n     Any monitoring script written for ``jwql`` must adhere to the\n     ``jwql`` style guide located at:\n-    https://github.com/spacetelescope/jwql/blob/master/style_guide/style_guide.md\n+    https://github.com/spacetelescope/jwql/blob/master/style_guide/README.md\n \"\"\"\n \n import os\n", "issue": "Add README to style_guide directory\nWe are starting to have a range of helpful documents in our `jwql/style_guide` directory - the general style guide. This is great!\r\n\r\nI am thinking it would now be helpful to include a `README.md` file in there, so that any prospective user who looks there is met with some information about what resources are available.\n", "before_files": [{"content": "#! /usr/bin/env python\n\n\"\"\"\nThis module is intended to be a template to aid in creating new\nmonitoring scripts and to demonstrate how to format them to fully\nutilize the ``jwql`` framework.\n\nEach monitoring script must be executable from the command line (i.e.\nhave a ``if '__name__' == '__main__' section), as well as have a \"main\"\nfunction that calls all other functions, methods, or modules (i.e.\nthe entirety of the code is executed within the scope of the main\nfunction), as shown in this example.\n\nUsers may utilize the ``jwql`` framework functions for logging,\nsetting permissions, parsing filenames, etc. (See related ``import``s).\n\nAuthors\n-------\n\n    - Catherine Martlin\n    - Matthew Bourque\n\nUse\n---\n\n    This module can be executed from the command line:\n    ::\n\n        python monitor_template.py\n\n    Alternatively, it can be called from a python environment via the\n    following import statements:\n    ::\n\n      from monitor_template import main_monitor_function\n      from monitor_template import secondary_function\n\nDependencies\n------------\n\n    The user must have a configuration file named ``config.json``\n    placed in the ``utils`` directory.\n\nNotes\n-----\n\n    Any monitoring script written for ``jwql`` must adhere to the\n    ``jwql`` style guide located at:\n    https://github.com/spacetelescope/jwql/blob/master/style_guide/style_guide.md\n\"\"\"\n\nimport os\nimport logging\n\nfrom astroquery.mast import Mast\nfrom jwst import datamodels\nfrom bokeh.charts import Donut\nfrom bokeh.embed import components\n\n# Functions for logging\nfrom jwql.logging.logging_functions import configure_logging\nfrom jwql.logging.logging_functions import log_info\nfrom jwql.logging.logging_functions import log_fail\n\n# Function for setting permissions of files/directories\nfrom jwql.permissions.permissions import set_permissions\n\n# Function for parsing filenames\nfrom jwql.utils.utils import filename_parser\n\n# Objects for hard-coded information\nfrom jwql.utils.utils import get_config\nfrom jwql.utils.constants import JWST_DATAPRODUCTS, JWST_INSTRUMENT_NAMES\n\n\n@log_fail\n@log_info\ndef monitor_template_main():\n    \"\"\" The main function of the ``monitor_template`` module.\"\"\"\n\n    # Example of logging\n    my_variable = 'foo'\n    logging.info('Some useful information: {}'.format(my_variable))\n\n    # Example of querying for a dataset via MAST API\n    service = \"Mast.Jwst.Filtered.Niriss\"\n    params = {\"columns\": \"filename\",\n              \"filters\": [{\"paramName\": \"filter\",\n                          \"values\": ['F430M']}]}\n    response = Mast.service_request_async(service, params)\n    result = response[0].json()['data']\n    filename_of_interest = result[0]['filename']  # jw00304002001_02102_00001_nis_uncal.fits\n\n    # Example of parsing a filename\n    filename_dict = filename_parser(filename_of_interest)\n    # Contents of filename_dict:\n    #     {'program_id': '00304',\n    #      'observation': '002',\n    #      'visit': '001',\n    #      'visit_group': '02',\n    #      'parallel_seq_id': '1',\n    #      'activity': '02',\n    #      'exposure_id': '00001',\n    #      'detector': 'nis',\n    #      'suffix': 'uncal'}\n\n    # Example of locating a dataset in the filesystem\n    filesystem = get_config()['filesystem']\n    dataset = os.path.join(filesystem, 'jw{}'.format(filename_dict['program_id']),\n                           filename_of_interest)\n\n    # Example of reading in dataset using jwst.datamodels\n    im = datamodels.open(dataset)\n    # Now have access to:\n    #     im.data  # Data array\n    #     im.err  # ERR array\n    #     im.meta  # Metadata such as header keywords\n\n    # Example of saving a file and setting permissions\n    im.save('some_filename.fits')\n    set_permissions('some_filename.fits')\n\n    # Example of creating and exporting a Bokeh plot\n    plt = Donut(im.data, plot_width=600, plot_height=600)\n    plt.sizing_mode = 'stretch_both'  # Necessary for responsive sizing on web app\n    script, div = components(plt)\n\n    plot_output_dir = get_config()['outputs']\n    div_outfile = os.path.join(plot_output_dir, 'monitor_name',\n                               filename_of_interest + \"_component.html\")\n    script_outfile = os.path.join(plot_output_dir, 'monitor_name',\n                                  filename_of_interest + \"_component.js\")\n\n    for outfile, component in zip([div_outfile, script_outfile], [div, script]):\n        with open(outfile, 'w') as f:\n            f.write(component)\n            f.close()\n        set_permissions(outfile)\n\n    # Perform any other necessary code\n    well_named_variable = \"Function does something.\"\n    result_of_second_function = second_function(well_named_variable)\n\n\ndef second_function(input_value):\n    \"\"\" This is your axiliary function; you may have many of these.\n\n    Parameters\n    ----------\n    input_value : str\n        Some value to modify in the function.\n\n    Returns\n    -------\n    useful_result : str\n        The result of modifying the input value.\n    \"\"\"\n\n    # Begin logging:\n    logging.info(\" \")\n    logging.info(\"The auxiliary function has started running.\")\n\n    # Example function:\n    useful_result = input_value + \" The other function did something, too.\"\n\n    logging.info(\"The auxiliary function is returning: \")\n    logging.info(useful_result)\n    logging.info(\" \")\n\n    return useful_result\n\n\nif __name__ == '__main__':\n\n    # Configure logging\n    module = os.path.basename(__file__).strip('.py')\n    configure_logging(module)\n\n    # Call the main function\n    monitor_template_main()\n", "path": "jwql/utils/monitor_template.py"}], "after_files": [{"content": "#! /usr/bin/env python\n\n\"\"\"\nThis module is intended to be a template to aid in creating new\nmonitoring scripts and to demonstrate how to format them to fully\nutilize the ``jwql`` framework.\n\nEach monitoring script must be executable from the command line (i.e.\nhave a ``if '__name__' == '__main__' section), as well as have a \"main\"\nfunction that calls all other functions, methods, or modules (i.e.\nthe entirety of the code is executed within the scope of the main\nfunction), as shown in this example.\n\nUsers may utilize the ``jwql`` framework functions for logging,\nsetting permissions, parsing filenames, etc. (See related ``import``s).\n\nAuthors\n-------\n\n    - Catherine Martlin\n    - Matthew Bourque\n\nUse\n---\n\n    This module can be executed from the command line:\n    ::\n\n        python monitor_template.py\n\n    Alternatively, it can be called from a python environment via the\n    following import statements:\n    ::\n\n      from monitor_template import main_monitor_function\n      from monitor_template import secondary_function\n\nDependencies\n------------\n\n    The user must have a configuration file named ``config.json``\n    placed in the ``utils`` directory.\n\nNotes\n-----\n\n    Any monitoring script written for ``jwql`` must adhere to the\n    ``jwql`` style guide located at:\n    https://github.com/spacetelescope/jwql/blob/master/style_guide/README.md\n\"\"\"\n\nimport os\nimport logging\n\nfrom astroquery.mast import Mast\nfrom jwst import datamodels\nfrom bokeh.charts import Donut\nfrom bokeh.embed import components\n\n# Functions for logging\nfrom jwql.logging.logging_functions import configure_logging\nfrom jwql.logging.logging_functions import log_info\nfrom jwql.logging.logging_functions import log_fail\n\n# Function for setting permissions of files/directories\nfrom jwql.permissions.permissions import set_permissions\n\n# Function for parsing filenames\nfrom jwql.utils.utils import filename_parser\n\n# Objects for hard-coded information\nfrom jwql.utils.utils import get_config\nfrom jwql.utils.constants import JWST_DATAPRODUCTS, JWST_INSTRUMENT_NAMES\n\n\n@log_fail\n@log_info\ndef monitor_template_main():\n    \"\"\" The main function of the ``monitor_template`` module.\"\"\"\n\n    # Example of logging\n    my_variable = 'foo'\n    logging.info('Some useful information: {}'.format(my_variable))\n\n    # Example of querying for a dataset via MAST API\n    service = \"Mast.Jwst.Filtered.Niriss\"\n    params = {\"columns\": \"filename\",\n              \"filters\": [{\"paramName\": \"filter\",\n                          \"values\": ['F430M']}]}\n    response = Mast.service_request_async(service, params)\n    result = response[0].json()['data']\n    filename_of_interest = result[0]['filename']  # jw00304002001_02102_00001_nis_uncal.fits\n\n    # Example of parsing a filename\n    filename_dict = filename_parser(filename_of_interest)\n    # Contents of filename_dict:\n    #     {'program_id': '00304',\n    #      'observation': '002',\n    #      'visit': '001',\n    #      'visit_group': '02',\n    #      'parallel_seq_id': '1',\n    #      'activity': '02',\n    #      'exposure_id': '00001',\n    #      'detector': 'nis',\n    #      'suffix': 'uncal'}\n\n    # Example of locating a dataset in the filesystem\n    filesystem = get_config()['filesystem']\n    dataset = os.path.join(filesystem, 'jw{}'.format(filename_dict['program_id']),\n                           filename_of_interest)\n\n    # Example of reading in dataset using jwst.datamodels\n    im = datamodels.open(dataset)\n    # Now have access to:\n    #     im.data  # Data array\n    #     im.err  # ERR array\n    #     im.meta  # Metadata such as header keywords\n\n    # Example of saving a file and setting permissions\n    im.save('some_filename.fits')\n    set_permissions('some_filename.fits')\n\n    # Example of creating and exporting a Bokeh plot\n    plt = Donut(im.data, plot_width=600, plot_height=600)\n    plt.sizing_mode = 'stretch_both'  # Necessary for responsive sizing on web app\n    script, div = components(plt)\n\n    plot_output_dir = get_config()['outputs']\n    div_outfile = os.path.join(plot_output_dir, 'monitor_name',\n                               filename_of_interest + \"_component.html\")\n    script_outfile = os.path.join(plot_output_dir, 'monitor_name',\n                                  filename_of_interest + \"_component.js\")\n\n    for outfile, component in zip([div_outfile, script_outfile], [div, script]):\n        with open(outfile, 'w') as f:\n            f.write(component)\n            f.close()\n        set_permissions(outfile)\n\n    # Perform any other necessary code\n    well_named_variable = \"Function does something.\"\n    result_of_second_function = second_function(well_named_variable)\n\n\ndef second_function(input_value):\n    \"\"\" This is your axiliary function; you may have many of these.\n\n    Parameters\n    ----------\n    input_value : str\n        Some value to modify in the function.\n\n    Returns\n    -------\n    useful_result : str\n        The result of modifying the input value.\n    \"\"\"\n\n    # Begin logging:\n    logging.info(\" \")\n    logging.info(\"The auxiliary function has started running.\")\n\n    # Example function:\n    useful_result = input_value + \" The other function did something, too.\"\n\n    logging.info(\"The auxiliary function is returning: \")\n    logging.info(useful_result)\n    logging.info(\" \")\n\n    return useful_result\n\n\nif __name__ == '__main__':\n\n    # Configure logging\n    module = os.path.basename(__file__).strip('.py')\n    configure_logging(module)\n\n    # Call the main function\n    monitor_template_main()\n", "path": "jwql/utils/monitor_template.py"}]}