prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  CIFAR10 run_fl.py misses license header
  https://github.com/NVIDIA/NVFlare/blob/d784e7be9742b4d1bcfa0f389ea063fec984fe50/examples/cifar10/run_fl.py#L1
  
  </issue>
  <code>
  [start of examples/cifar10/run_fl.py]
  1 import argparse
  2 import os
  3 import time
  4 
  5 from nvflare.fuel.hci.client.fl_admin_api_runner import FLAdminAPIRunner
  6 
  7 
  8 def main():
  9     parser = argparse.ArgumentParser()
  10     parser.add_argument("--run_number", type=int, default=100, help="FL run number to start at.")
  11     parser.add_argument("--admin_dir", type=str, default="./admin/", help="Path to admin directory.")
  12     parser.add_argument("--username", type=str, default="admin@nvidia.com", help="Admin username")
  13     parser.add_argument("--app", type=str, default="cifar10_fedavg", help="App to be deployed")
  14     parser.add_argument("--port", type=int, default=8003, help="The admin server port")
  15     parser.add_argument("--poc", action='store_true', help="Whether admin uses POC mode.")
  16     parser.add_argument("--min_clients", type=int, default=8, help="Minimum number of clients.")
  17     args = parser.parse_args()
  18 
  19     host = ""
  20     port = args.port
  21 
  22     assert os.path.isdir(args.admin_dir), f"admin directory does not exist at {args.admin_dir}"
  23 
  24     # Set up certificate names and admin folders
  25     upload_dir = os.path.join(args.admin_dir, "transfer")
  26     if not os.path.isdir(upload_dir):
  27         os.makedirs(upload_dir)
  28     download_dir = os.path.join(args.admin_dir, "download")
  29     if not os.path.isdir(download_dir):
  30         os.makedirs(download_dir)
  31 
  32     run_number = args.run_number
  33 
  34     # Initialize the runner
  35     runner = FLAdminAPIRunner(
  36         host=host,
  37         port=port,
  38         username=args.username,
  39         admin_dir=args.admin_dir,
  40         poc=args.poc,
  41         debug=False,
  42     )
  43 
  44     # Run
  45     start = time.time()
  46     runner.run(run_number, args.app, restart_all_first=False, shutdown_on_error=True, shutdown_at_end=True,
  47                timeout=7200, min_clients=args.min_clients)  # will time out if not completed in 2 hours
  48     print("Total training time", time.time() - start)
  49 
  50 
  51 if __name__ == "__main__":
  52     main()
  53
  [end of examples/cifar10/run_fl.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/examples/cifar10/run_fl.py b/examples/cifar10/run_fl.py
  --- a/examples/cifar10/run_fl.py
  +++ b/examples/cifar10/run_fl.py
  @@ -1,3 +1,17 @@
  +# Copyright (c) 2021, NVIDIA CORPORATION.
  +#
  +# Licensed under the Apache License, Version 2.0 (the "License");
  +# you may not use this file except in compliance with the License.
  +# You may obtain a copy of the License at
  +#
  +#     http://www.apache.org/licenses/LICENSE-2.0
  +#
  +# Unless required by applicable law or agreed to in writing, software
  +# distributed under the License is distributed on an "AS IS" BASIS,
  +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +# See the License for the specific language governing permissions and
  +# limitations under the License.
  +
   import argparse
   import os
   import time
  
verification_info: {"golden_diff": "diff --git a/examples/cifar10/run_fl.py b/examples/cifar10/run_fl.py\n--- a/examples/cifar10/run_fl.py\n+++ b/examples/cifar10/run_fl.py\n@@ -1,3 +1,17 @@\n+# Copyright (c) 2021, NVIDIA CORPORATION.\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+\n import argparse\n import os\n import time\n", "issue": "CIFAR10 run_fl.py misses license header\nhttps://github.com/NVIDIA/NVFlare/blob/d784e7be9742b4d1bcfa0f389ea063fec984fe50/examples/cifar10/run_fl.py#L1\n", "before_files": [{"content": "import argparse\nimport os\nimport time\n\nfrom nvflare.fuel.hci.client.fl_admin_api_runner import FLAdminAPIRunner\n\n\ndef main():\n    parser = argparse.ArgumentParser()\n    parser.add_argument(\"--run_number\", type=int, default=100, help=\"FL run number to start at.\")\n    parser.add_argument(\"--admin_dir\", type=str, default=\"./admin/\", help=\"Path to admin directory.\")\n    parser.add_argument(\"--username\", type=str, default=\"admin@nvidia.com\", help=\"Admin username\")\n    parser.add_argument(\"--app\", type=str, default=\"cifar10_fedavg\", help=\"App to be deployed\")\n    parser.add_argument(\"--port\", type=int, default=8003, help=\"The admin server port\")\n    parser.add_argument(\"--poc\", action='store_true', help=\"Whether admin uses POC mode.\")\n    parser.add_argument(\"--min_clients\", type=int, default=8, help=\"Minimum number of clients.\")\n    args = parser.parse_args()\n\n    host = \"\"\n    port = args.port\n\n    assert os.path.isdir(args.admin_dir), f\"admin directory does not exist at {args.admin_dir}\"\n\n    # Set up certificate names and admin folders\n    upload_dir = os.path.join(args.admin_dir, \"transfer\")\n    if not os.path.isdir(upload_dir):\n        os.makedirs(upload_dir)\n    download_dir = os.path.join(args.admin_dir, \"download\")\n    if not os.path.isdir(download_dir):\n        os.makedirs(download_dir)\n\n    run_number = args.run_number\n\n    # Initialize the runner\n    runner = FLAdminAPIRunner(\n        host=host,\n        port=port,\n        username=args.username,\n        admin_dir=args.admin_dir,\n        poc=args.poc,\n        debug=False,\n    )\n\n    # Run\n    start = time.time()\n    runner.run(run_number, args.app, restart_all_first=False, shutdown_on_error=True, shutdown_at_end=True,\n               timeout=7200, min_clients=args.min_clients)  # will time out if not completed in 2 hours\n    print(\"Total training time\", time.time() - start)\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "examples/cifar10/run_fl.py"}]}