[
  {
    "path": ".gitignore",
    "content": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pyenv\n#   For a library or package, you might want to ignore these files since the code is\n#   intended to run in multiple environments; otherwise, check them in:\n# .python-version\n\n# pipenv\n#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.\n#   However, in case of collaboration, if having platform-specific dependencies or dependencies\n#   having no cross-platform support, pipenv may install dependencies that don't work, or not\n#   install all needed dependencies.\n#Pipfile.lock\n\n# poetry\n#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.\n#   This is especially recommended for binary packages to ensure reproducibility, and is more\n#   commonly ignored for libraries.\n#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control\n#poetry.lock\n\n# pdm\n#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n#   in version control.\n#   https://pdm.fming.dev/#use-with-ide\n.pdm.toml\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# PyCharm\n#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can\n#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore\n#  and can be added to the global gitignore or merged into this file.  For a more nuclear\n#  option (not recommended) you can uncomment the following to ignore the entire idea folder.\n#.idea/\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2023 Sasha Rush\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Transformer Puzzles\n\n<a target=\"_blank\" href=\"https://colab.research.google.com/github/srush/Transformer-Puzzles/blob/main/TransformerPuzzlers.ipynb\">\n  <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n</a>\n\n\n\n<!-- #region id=\"e9e822cb\" -->\nThis notebook is a collection of short coding puzzles based on the internals of the Transformer. The puzzles are written in Python and can be done in this notebook. After completing these you will have a much better intutive sense of how a Transformer can compute certain logical operations. \n\nThese puzzles are based on [Thinking Like Transformers](https://arxiv.org/pdf/2106.06981.pdf) by Gail Weiss, Yoav Goldberg, Eran Yahav and derived from this [blog post](https://srush.github.io/raspy/).\n<!-- #endregion -->\n\n![image](https://user-images.githubusercontent.com/35882/235678934-44c83052-9743-4de7-a46c-49a517923da1.png)\n\n\n<!-- #region id=\"8e962052\" -->\n## Goal\n\n**Can we produce a Transformer that does basic elementary school addition?**\n\ni.e. given a string \"19492+23919\" can we produce the correct output? \n<!-- #endregion -->\n\n<!-- #region id=\"d332140b\" -->\n## Rules\n\nEach exercise consists of a function with a argument `seq` and output `seq`. Like a transformer we cannot change length. Operations need to act on the entire sequence in parallel. There is a global `indices` which tells use the position in the sequence. If we want to do something different on certain positions we can use `where` like in Numpy or PyTorch. To run the seq we need to give it an initial input. \n<!-- #endregion -->\n\n\n```python colab={\"base_uri\": \"https://localhost:8080/\", \"height\": 96} id=\"1b28dc98\" outputId=\"f1ac1157-3db8-40c0-dbb2-7d9bad8943a0\"\ndef even_vals(seq=tokens):\n    \"Keep even positions, set odd positions to -1\"\n    x = indices % 2\n    # Note that all operations broadcast so you can use scalars.\n    return where(x == 0, seq, -1)\nseq = even_vals()\n\n# Give the initial input tokens\nseq.input([0,1,2,3,4])\n```\n\n<!-- #region id=\"9dc23f88\" -->\nThe main operation you can use is \"attention\". You do this by defining a selector which forms a matrix based on `key` and `query`.\n<!-- #endregion -->\n\n```python colab={\"base_uri\": \"https://localhost:8080/\", \"height\": 176} id=\"e2ee0ff8\" outputId=\"a61ac19c-2550-4f3c-d653-50c323cdfd59\"\nbefore = key(indices) < query(indices)\nbefore\n```\n\n<!-- #region id=\"a4de0a14\" -->\nWe can combine selectors with logical operations.\n<!-- #endregion -->\n\n```python colab={\"base_uri\": \"https://localhost:8080/\", \"height\": 201} id=\"c315ba6d\" outputId=\"270d50fa-649c-438b-8606-d3d078478162\"\nbefore_or_same = before | (key(indices) == query(indices))\nbefore_or_same\n```\n\n<!-- #region id=\"00bc66a3\" -->\nOnce you have a selector, you can apply \"attention\" to sum over the grey positions. For example to compute cumulative such we run the following function. \n<!-- #endregion -->\n\n```python colab={\"base_uri\": \"https://localhost:8080/\", \"height\": 326} id=\"e79c8c8b\" outputId=\"44db7f90-502d-497c-c5ba-4062c09f0a9a\"\ndef cumsum(seq=tokens):\n    return before_or_same.value(seq)\nseq = cumsum()\nseq.input([0, 1, 2, 3, 4])\n```\n\nGood luck!\n"
  },
  {
    "path": "TransformerPuzzlers.ipynb",
    "content": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"view-in-github\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"<a href=\\\"https://colab.research.google.com/github/srush/Transformer-Puzzles/blob/main/TransformerPuzzlers.ipynb\\\" target=\\\"_parent\\\"><img src=\\\"https://colab.research.google.com/assets/colab-badge.svg\\\" alt=\\\"Open In Colab\\\"/></a>\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"f8117f57\",\n      \"metadata\": {\n        \"id\": \"f8117f57\"\n      },\n      \"source\": [\n        \"# Transformer Puzzles\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"e9e822cb\",\n      \"metadata\": {\n        \"id\": \"e9e822cb\"\n      },\n      \"source\": [\n        \"This notebook is a collection of short coding puzzles based on the internals of the Transformer. The puzzles are written in Python and can be done in this notebook. After completing these you will have a much better intutive sense of how a Transformer can compute certain logical operations. \\n\",\n        \"\\n\",\n        \"These puzzles are based on [Thinking Like Transformers](https://arxiv.org/pdf/2106.06981.pdf) by Gail Weiss, Yoav Goldberg, Eran Yahav and derived from this [blog post](https://srush.github.io/raspy/).\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"8e962052\",\n      \"metadata\": {\n        \"id\": \"8e962052\"\n      },\n      \"source\": [\n        \"## Goal\\n\",\n        \"\\n\",\n        \"**Can we produce a Transformer that does basic addition?**\\n\",\n        \"\\n\",\n        \"i.e. given a string \\\"19492+23919\\\" can we produce the correct output? \"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"d332140b\",\n      \"metadata\": {\n        \"id\": \"d332140b\"\n      },\n      \"source\": [\n        \"## Rules\\n\",\n        \"\\n\",\n        \"Each exercise consists of a function with a argument `seq` and output `seq`. Like a transformer we cannot change length. Operations need to act on the entire sequence in parallel. There is a global `indices` which tells use the position in the sequence. If we want to do something different on certain positions we can use `where` like in Numpy or PyTorch. To run the seq we need to give it an initial input. \"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"6c5c885a\",\n      \"metadata\": {\n        \"id\": \"6c5c885a\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"%%capture\\n\",\n        \"!pip install -qqq git+https://github.com/chalk-diagrams/chalk git+https://github.com/srush/RASPy \"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"51724e11\",\n      \"metadata\": {\n        \"id\": \"51724e11\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"from IPython.display import display, HTML\\n\",\n        \"from raspy import key, query, tokens, indices, where, draw\\n\",\n        \"import random\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"1b28dc98\",\n      \"metadata\": {\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 96\n        },\n        \"id\": \"1b28dc98\",\n        \"outputId\": \"f1ac1157-3db8-40c0-dbb2-7d9bad8943a0\"\n      },\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"[0, -1, 2, -1, 4]\"\n            ],\n            \"image/svg+xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\\n<svg baseProfile=\\\"full\\\" height=\\\"75.0\\\" version=\\\"1.1\\\" width=\\\"200\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:ev=\\\"http://www.w3.org/2001/xml-events\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><marker id=\\\"arrow\\\" markerHeight=\\\"3.5\\\" markerWidth=\\\"5\\\" orient=\\\"auto\\\" refX=\\\"5.0\\\" refY=\\\"1.7\\\"><polygon points=\\\"0,0 5,1.75 0,3.5\\\" /></marker></defs><g style=\\\"fill:white;\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 100.0, 37.5)\\\"><g transform=\\\"matrix(23.809523809523807, 0.0, 0.0, 23.809523809523807, 0.0, 0.0)\\\"><g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.0, -0.0)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -2.5, -1.0)\\\"><g><g><g><g><g><g style=\\\"fill: #1d7874;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">Input</text></g><g /></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 1.0)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.0)\\\"><g><g><g><g style=\\\"fill: #1d7874;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">Final</text></g><g /></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">-1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">-1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g></g></g></g></g><g /></g></g></g></g></svg>\"\n          },\n          \"metadata\": {},\n          \"execution_count\": 3\n        }\n      ],\n      \"source\": [\n        \"def even_vals(seq=tokens):\\n\",\n        \"    \\\"Keep even positions, set odd positions to -1\\\"\\n\",\n        \"    x = indices % 2\\n\",\n        \"    # Note that all operations broadcast so you can use scalars.\\n\",\n        \"    return where(x == 0, seq, -1)\\n\",\n        \"seq = even_vals()\\n\",\n        \"\\n\",\n        \"# Give the initial input tokens\\n\",\n        \"seq.input([0,1,2,3,4])\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"9dc23f88\",\n      \"metadata\": {\n        \"id\": \"9dc23f88\"\n      },\n      \"source\": [\n        \"The main operation you can use is \\\"attention\\\". You do this by defining a selector which forms a matrix based on `key` and `query`.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"e2ee0ff8\",\n      \"metadata\": {\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 176\n        },\n        \"id\": \"e2ee0ff8\",\n        \"outputId\": \"a61ac19c-2550-4f3c-d653-50c323cdfd59\"\n      },\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"Selector Layer 0\\n\",\n              \"        0 1 2 3 4\\n\",\n              \"        |h e l l o|\\n\",\n              \"        0 1 2 3 4\\n\",\n              \"        |---------|\\n\",\n              \"0 h 0 |   1 1 1 1\\n\",\n              \"1 e 1 |     1 1 1\\n\",\n              \"2 l 2 |       1 1\\n\",\n              \"3 l 3 |         1\\n\",\n              \"4 o 4 |          \"\n            ],\n            \"image/svg+xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\\n<svg baseProfile=\\\"full\\\" height=\\\"154.99999999999997\\\" version=\\\"1.1\\\" width=\\\"154\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:ev=\\\"http://www.w3.org/2001/xml-events\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><marker id=\\\"arrow\\\" markerHeight=\\\"3.5\\\" markerWidth=\\\"5\\\" orient=\\\"auto\\\" refX=\\\"5.0\\\" refY=\\\"1.7\\\"><polygon points=\\\"0,0 5,1.75 0,3.5\\\" /></marker></defs><g style=\\\"fill:white;\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 77.00000000000001, 77.00000000000001)\\\"><g transform=\\\"matrix(23.655913978494624, 0.0, 0.0, 23.655913978494624, 0.0, 0.0)\\\"><g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5000000000000002, 0.5)\\\"><g><g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -4.0, -1.9999999999999998)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.0, -3.0999999999999996)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -2.0, -0.5)\\\"><g><g /><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -3.1, -0.0)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -2.0)\\\"><g><g /><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 1.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 2.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 3.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 4.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g></g></g></g></g><g /></g></g></g></g></svg>\"\n          },\n          \"metadata\": {},\n          \"execution_count\": 4\n        }\n      ],\n      \"source\": [\n        \"before = key(indices) < query(indices)\\n\",\n        \"before\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"a4de0a14\",\n      \"metadata\": {\n        \"id\": \"a4de0a14\"\n      },\n      \"source\": [\n        \"We can combine selectors with logical operations.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"c315ba6d\",\n      \"metadata\": {\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 201\n        },\n        \"id\": \"c315ba6d\",\n        \"outputId\": \"270d50fa-649c-438b-8606-d3d078478162\"\n      },\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"Selector Layer 0\\n\",\n              \"        0 1 2 3 4\\n\",\n              \"        |h e l l o|\\n\",\n              \"        0 1 2 3 4\\n\",\n              \"        0 1 2 3 4\\n\",\n              \"        |---------|\\n\",\n              \"0 h 0 | 1 1 1 1 1\\n\",\n              \"1 e 1 |   1 1 1 1\\n\",\n              \"2 l 2 |     1 1 1\\n\",\n              \"3 l 3 |       1 1\\n\",\n              \"4 o 4 |         1\"\n            ],\n            \"image/svg+xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\\n<svg baseProfile=\\\"full\\\" height=\\\"179.99999999999997\\\" version=\\\"1.1\\\" width=\\\"180\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:ev=\\\"http://www.w3.org/2001/xml-events\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><marker id=\\\"arrow\\\" markerHeight=\\\"3.5\\\" markerWidth=\\\"5\\\" orient=\\\"auto\\\" refX=\\\"5.0\\\" refY=\\\"1.7\\\"><polygon points=\\\"0,0 5,1.75 0,3.5\\\" /></marker></defs><g style=\\\"fill:white;\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 89.99999999999999, 89.99999999999999)\\\"><g transform=\\\"matrix(23.809523809523807, 0.0, 0.0, 23.809523809523807, 0.0, 0.0)\\\"><g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 1.0)\\\"><g><g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -4.0, -1.9999999999999998)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.0, -3.5999999999999996)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -2.0, -1.0)\\\"><g><g><g /><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -3.6, -0.0)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -1.0, -2.0)\\\"><g><g><g /><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 1.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 2.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 3.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 4.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 1.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 2.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 3.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 4.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g></g></g></g></g><g /></g></g></g></g></svg>\"\n          },\n          \"metadata\": {},\n          \"execution_count\": 5\n        }\n      ],\n      \"source\": [\n        \"before_or_same = before | (key(indices) == query(indices))\\n\",\n        \"before_or_same\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"00bc66a3\",\n      \"metadata\": {\n        \"id\": \"00bc66a3\"\n      },\n      \"source\": [\n        \"Once you have a selector, you can apply \\\"attention\\\" to sum over the grey positions. For example to compute cumulative such we run the following function. \"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"e79c8c8b\",\n      \"metadata\": {\n        \"lines_to_next_cell\": 1,\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 326\n        },\n        \"id\": \"e79c8c8b\",\n        \"outputId\": \"44db7f90-502d-497c-c5ba-4062c09f0a9a\"\n      },\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"[0, 1, 3, 6, 10]\"\n            ],\n            \"image/svg+xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\\n<svg baseProfile=\\\"full\\\" height=\\\"305.0\\\" version=\\\"1.1\\\" width=\\\"305\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:ev=\\\"http://www.w3.org/2001/xml-events\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><marker id=\\\"arrow\\\" markerHeight=\\\"3.5\\\" markerWidth=\\\"5\\\" orient=\\\"auto\\\" refX=\\\"5.0\\\" refY=\\\"1.7\\\"><polygon points=\\\"0,0 5,1.75 0,3.5\\\" /></marker></defs><g style=\\\"fill:white;\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 152.5, 152.5)\\\"><g transform=\\\"matrix(23.80952380952381, 0.0, 0.0, 23.80952380952381, 0.0, 0.0)\\\"><g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.0, -0.0)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -4.6, -5.6)\\\"><g><g><g><g><g><g><g><g style=\\\"fill: #1d7874;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">Input</text></g><g /></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 1.0)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 6.1)\\\"><g><g><g><g><g style=\\\"fill: #1d7874;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">Layer 1</text></g><g /></g><g /></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 7.1, 0.0)\\\"><g><g><g><g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -4.0, -1.9999999999999998)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, -0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 0.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 1.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #ffffff;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 2.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g style=\\\"fill: #d3d3d3;stroke: #071e22;stroke-width: 0.9;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.5, 3.5)\\\"><path d=\\\"M 0.0 0.0 L 1.0 0.0 L 1.0 1.0 L 0.0 1.0 L 0.0 0.0 Z\\\" style=\\\"vector-effect: non-scaling-stroke;\\\" /></g></g></g></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.0, -3.5999999999999996)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -2.0, -1.0)\\\"><g><g><g /><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #f4c095;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -3.6, -0.0)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -1.0, -2.0)\\\"><g><g><g /><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 1.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 2.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 3.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 4.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 1.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 2.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 3.5)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 4.0)\\\"><g><g style=\\\"fill: #679289;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0999999999999996, 0.0)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.0, -2.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #071e22;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.0)\\\"><g><g style=\\\"fill: #071e22;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 1.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.0)\\\"><g><g style=\\\"fill: #071e22;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.0)\\\"><g><g style=\\\"fill: #071e22;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">6</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.5)\\\"><g transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 4.0)\\\"><g><g style=\\\"fill: #071e22;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">10</text></g><g /></g></g></g></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 3.0999999999999996)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -2.0, -0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #ee2e31;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #ee2e31;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #ee2e31;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #ee2e31;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #ee2e31;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">4</text></g><g /></g></g></g></g></g></g></g></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 10.2)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 11.2)\\\"><g><g><g><g style=\\\"fill: #1d7874;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">Final</text></g><g /></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">0</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">6</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 4.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">10</text></g><g /></g></g></g></g></g></g></g></g></g><g /></g></g></g></g></svg>\"\n          },\n          \"metadata\": {},\n          \"execution_count\": 6\n        }\n      ],\n      \"source\": [\n        \"def cumsum(seq=tokens):\\n\",\n        \"    return before_or_same.value(seq)\\n\",\n        \"seq = cumsum()\\n\",\n        \"seq.input([0, 1, 2, 3, 4])\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"9ae57559\",\n      \"metadata\": {\n        \"cellView\": \"form\",\n        \"id\": \"9ae57559\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"#@title Test Code (Collapse)\\n\",\n        \"def atoi(seq=tokens):\\n\",\n        \"    return seq.map(lambda x: ord(x) - ord('0'))\\n\",\n        \"\\n\",\n        \"def test_output(user, spec, token_sets):\\n\",\n        \"    for ex_num, token_set in enumerate(token_sets):        \\n\",\n        \"        out1 = user(*token_set[:-1])((token_set[-1]))\\n\",\n        \"        out2 = spec(*token_set)\\n\",\n        \"        print(f\\\"Example {ex_num}. Args:\\\", token_set, \\\"Expected:\\\", out2)\\n\",\n        \"        display(out1)\\n\",\n        \"        out1 = out1.toseq()\\n\",\n        \"        for i, o in enumerate(out2):\\n\",\n        \"            assert out1[i] == o, f\\\"Output: {out1} Expected: {out2}\\\"\\n\",\n        \"\\n\",\n        \"    pups = [\\n\",\n        \"    \\\"2m78jPG\\\",\\n\",\n        \"    \\\"pn1e9TO\\\",\\n\",\n        \"    \\\"MQCIwzT\\\",\\n\",\n        \"    \\\"udLK6FS\\\",\\n\",\n        \"    \\\"ZNem5o3\\\",\\n\",\n        \"    \\\"DS2IZ6K\\\",\\n\",\n        \"    \\\"aydRUz8\\\",\\n\",\n        \"    \\\"MVUdQYK\\\",\\n\",\n        \"    \\\"kLvno0p\\\",\\n\",\n        \"    \\\"wScLiVz\\\",\\n\",\n        \"    \\\"Z0TII8i\\\",\\n\",\n        \"    \\\"F1SChho\\\",\\n\",\n        \"    \\\"9hRi2jN\\\",\\n\",\n        \"    \\\"lvzRF3W\\\",\\n\",\n        \"    \\\"fqHxOGI\\\",\\n\",\n        \"    \\\"1xeUYme\\\",\\n\",\n        \"    \\\"6tVqKyM\\\",\\n\",\n        \"    \\\"CCxZ6Wr\\\",\\n\",\n        \"    \\\"lMW0OPQ\\\",\\n\",\n        \"    \\\"wHVpHVG\\\",\\n\",\n        \"    \\\"Wj2PGRl\\\",\\n\",\n        \"    \\\"HlaTE8H\\\",\\n\",\n        \"    \\\"k5jALH0\\\",\\n\",\n        \"    \\\"3V37Hqr\\\",\\n\",\n        \"    \\\"Eq2uMTA\\\",\\n\",\n        \"    \\\"Vy9JShx\\\",\\n\",\n        \"    \\\"g9I2ZmK\\\",\\n\",\n        \"    \\\"Nu4RH7f\\\",\\n\",\n        \"    \\\"sWp0Dqd\\\",\\n\",\n        \"    \\\"bRKfspn\\\",\\n\",\n        \"    \\\"qawCMl5\\\",\\n\",\n        \"    \\\"2F6j2B4\\\",\\n\",\n        \"    \\\"fiJxCVA\\\",\\n\",\n        \"    \\\"pCAIlxD\\\",\\n\",\n        \"    \\\"zJx2skh\\\",\\n\",\n        \"    \\\"2Gdl1u7\\\",\\n\",\n        \"    \\\"aJJAY4c\\\",\\n\",\n        \"    \\\"ros6RLC\\\",\\n\",\n        \"    \\\"DKLBJh7\\\",\\n\",\n        \"    \\\"eyxH0Wc\\\",\\n\",\n        \"    \\\"rJEkEw4\\\"]\\n\",\n        \"    print(\\\"Success!\\\")\\n\",\n        \"    return HTML(\\\"\\\"\\\"\\n\",\n        \"    <video alt=\\\"test\\\" controls autoplay=1>\\n\",\n        \"        <source src=\\\"https://openpuppies.com/mp4/%s.mp4\\\"  type=\\\"video/mp4\\\">\\n\",\n        \"    </video>\\n\",\n        \"    \\\"\\\"\\\"%(random.sample(pups, 1)[0]))\\n\",\n        \"SEQ = [2,1,3,2,4]\\n\",\n        \"SEQ2 = [3, 4 ,3, -1, 2]\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"57d753ac\",\n      \"metadata\": {\n        \"id\": \"57d753ac\"\n      },\n      \"source\": [\n        \"For each problem we will provide a Python specification. Your goal is to implement that specification with Transformers.\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"77441886\",\n      \"metadata\": {\n        \"id\": \"77441886\"\n      },\n      \"source\": [\n        \"### Challenge 0: Select the initial position\\n\",\n        \"\\n\",\n        \"Given a initial sequence compute a new sequence where all positions have the initial value. (1 line)\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"1da74d03\",\n      \"metadata\": {\n        \"id\": \"1da74d03\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def head_spec(seq):\\n\",\n        \"    return [seq[0] for _ in seq]\\n\",\n        \"\\n\",\n        \"def head(seq=tokens):\\n\",\n        \"    return (key(indices) == query(0)).value(seq)\\n\",\n        \"  \\n\",\n        \"test_output(head, head_spec, [(SEQ,),(SEQ2,)])\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"f565d61c\",\n      \"metadata\": {\n        \"id\": \"f565d61c\"\n      },\n      \"source\": [\n        \"### Challenge 1: Select a given index\\n\",\n        \"\\n\",\n        \"Produce a sequence where all the elements have the value at index `i`.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"10d1b909\",\n      \"metadata\": {\n        \"lines_to_next_cell\": 1,\n        \"id\": \"10d1b909\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def index_spec(i, seq):\\n\",\n        \"    return [seq[i] for _ in seq]\\n\",\n        \"\\n\",\n        \"def index(i, seq=tokens):\\n\",\n        \"    raise NotImplementedError\\n\",\n        \"\\n\",\n        \"test_output(index, index_spec, [(2, SEQ), (3, SEQ2), (1, SEQ)])\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"a6c2b47d\",\n      \"metadata\": {\n        \"id\": \"a6c2b47d\"\n      },\n      \"source\": [\n        \"### Challenge 2: Shift\\n\",\n        \"\\n\",\n        \"Shift all of the tokens in a sequence to the right by `i` positions filling in the values with `default`. (1 line)\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"d9b5db79\",\n      \"metadata\": {\n        \"lines_to_next_cell\": 1,\n        \"id\": \"d9b5db79\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def shift_spec(i, default=\\\"0\\\", seq=None):\\n\",\n        \"    return [default]*i + [s for j, s in enumerate(seq) if j < len(seq) - i]\\n\",\n        \"\\n\",\n        \"def shift(i, default=\\\"0\\\", seq=tokens):\\n\",\n        \"    raise NotImplementedError\\n\",\n        \"\\n\",\n        \"test_output(shift, shift_spec, [(2, 0, SEQ), (3, 0, SEQ2), (1, 0, SEQ)])\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"3f87e538\",\n      \"metadata\": {\n        \"lines_to_next_cell\": 2,\n        \"id\": \"3f87e538\"\n      },\n      \"source\": [\n        \"### Challenge 3: Right Align\\n\",\n        \"\\n\",\n        \"Right align a padded sequence e.g. ralign().inputs('xyz___') = '000xyz'\\\" (3 layers) (2 lines)\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"a841d6f4\",\n      \"metadata\": {\n        \"lines_to_next_cell\": 1,\n        \"id\": \"a841d6f4\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def ralign_spec(ldefault=\\\"0\\\", seq=tokens):\\n\",\n        \"    last = None\\n\",\n        \"    for i in range(len(seq)-1, -1, -1):\\n\",\n        \"        if seq[i] == \\\"_\\\":\\n\",\n        \"            last = i\\n\",\n        \"        else:\\n\",\n        \"            break\\n\",\n        \"    if last == None:\\n\",\n        \"        return seq\\n\",\n        \"    return [ldefault] * (len(seq) - last)  + seq[:last]\\n\",\n        \"\\n\",\n        \"def ralign(ldefault=\\\"0\\\", seq=tokens):\\n\",\n        \"    raise NotImplementedError\\n\",\n        \"\\n\",\n        \"test_output(ralign, ralign_spec, [(\\\"-\\\", list(\\\"xyzabc__\\\"),), (\\\"0\\\", list(\\\"xyz___\\\"),)])\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"a178203a\",\n      \"metadata\": {\n        \"id\": \"a178203a\"\n      },\n      \"source\": [\n        \"### Challenge 4: Split\\n\",\n        \"\\n\",\n        \"Split a sequence on a value. Get the first or second part. Right align. (5 lines)\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"e69995ed\",\n      \"metadata\": {\n        \"lines_to_next_cell\": 1,\n        \"id\": \"e69995ed\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def split_spec(v, get_first_part, seq):\\n\",\n        \"    out = []\\n\",\n        \"    mid = False\\n\",\n        \"    blank = \\\"0\\\" if not get_first_part else \\\"_\\\"\\n\",\n        \"    for j, s in enumerate(seq):\\n\",\n        \"        if s == v:\\n\",\n        \"            out.append(blank)\\n\",\n        \"            mid = True\\n\",\n        \"        elif (get_first_part and not mid) or (not get_first_part and mid):\\n\",\n        \"            out.append(s)\\n\",\n        \"        else:\\n\",\n        \"            out.append(blank)\\n\",\n        \"    return ralign_spec(\\\"0\\\", seq=out)\\n\",\n        \"\\n\",\n        \"def split(v, get_first_part, seq=tokens):\\n\",\n        \"    raise NotImplementedError\\n\",\n        \"\\n\",\n        \"test_output(split, split_spec,\\n\",\n        \"            [(\\\"-\\\", 1, list(\\\"xyz-ax\\\"),),\\n\",\n        \"             (\\\"-\\\", 0, list(\\\"xyz-ax\\\"),),\\n\",\n        \"             (\\\"+\\\", 0, list(\\\"xy+z-ax\\\"),)]\\n\",\n        \"             )\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"f9d19ecd\",\n      \"metadata\": {\n        \"id\": \"f9d19ecd\"\n      },\n      \"source\": [\n        \"### Challenge 5: Minimum \\n\",\n        \"\\n\",\n        \"Compute the minimum value of the sequence. This one starts to get harder! (5 lines of code)\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"53b19ac8\",\n      \"metadata\": {\n        \"lines_to_next_cell\": 1,\n        \"id\": \"53b19ac8\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def minimum_spec(seq):\\n\",\n        \"    m = min(seq)\\n\",\n        \"    return [m for _ in seq]\\n\",\n        \"\\n\",\n        \"def minimum(seq=tokens):\\n\",\n        \"    raise NotImplementedError\\n\",\n        \"\\n\",\n        \"test_output(minimum, minimum_spec, [(SEQ,), (SEQ2,), ([2, 1, 1],)])\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"6d2fe8ec\",\n      \"metadata\": {\n        \"id\": \"6d2fe8ec\"\n      },\n      \"source\": [\n        \"### Challenge 6: First Index\\n\",\n        \"\\n\",\n        \"Compute the first index that has token `token`. (1 line)\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"a4a6a030\",\n      \"metadata\": {\n        \"lines_to_next_cell\": 1,\n        \"id\": \"a4a6a030\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def first_spec(token, seq):\\n\",\n        \"    first = None\\n\",\n        \"    for i, s in enumerate(seq):\\n\",\n        \"        if s == token and first is None:\\n\",\n        \"            first = i\\n\",\n        \"    return [first for _ in seq]\\n\",\n        \"\\n\",\n        \"def first(token, seq=tokens):\\n\",\n        \"    raise NotImplementedError\\n\",\n        \"\\n\",\n        \"test_output(first, first_spec, [(3, SEQ), (-1, SEQ2), ('l', list('hello'))])\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"38236f00\",\n      \"metadata\": {\n        \"id\": \"38236f00\"\n      },\n      \"source\": [\n        \"### Challenge 7: Slide\\n\",\n        \"\\n\",\n        \"Replace special tokens \\\"<\\\" with the closest non \\\"<\\\" value to their right. (4 lines of code)\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"7781c97c\",\n      \"metadata\": {\n        \"id\": \"7781c97c\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def slide_spec(match, seq):\\n\",\n        \"    out = []\\n\",\n        \"    for i, s in enumerate(seq):\\n\",\n        \"        if s == \\\"<\\\":\\n\",\n        \"            for v in seq[i+1:]:\\n\",\n        \"                if v != \\\"<\\\":\\n\",\n        \"                    out.append(v)\\n\",\n        \"                    break\\n\",\n        \"        else:\\n\",\n        \"            out.append(s)\\n\",\n        \"    return out\\n\",\n        \"\\n\",\n        \"def slide(match=\\\"<\\\", seq=tokens):\\n\",\n        \"    raise NotImplementedError\\n\",\n        \"\\n\",\n        \"test_output(slide, slide_spec,\\n\",\n        \"            [(\\\"<\\\",  list(\\\"1<<2\\\"),),\\n\",\n        \"             (\\\"<\\\",  list(\\\"2<<<3\\\"),),\\n\",\n        \"             (\\\"<\\\",  list(\\\"3<<<1<<3\\\"),)]\\n\",\n        \"             )\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"id\": \"6be44511\",\n      \"metadata\": {\n        \"id\": \"6be44511\"\n      },\n      \"source\": [\n        \"### Final Challenge: Adder\\n\",\n        \"\\n\",\n        \"Now we will put everything together. Here are the steps. \\n\",\n        \"\\n\",\n        \"add().input(\\\"683+345\\\")\\n\",\n        \"\\n\",\n        \"0) Split into parts. Convert to ints. Add\\n\",\n        \"\\n\",\n        \"> \\\"683+345\\\" => [0, 0, 0, 9, 12, 8]\\n\",\n        \"\\n\",\n        \"1) Compute the carry terms. Three possibilities: 1 has carry, 0 no carry, < maybe has carry. \\n\",\n        \"\\n\",\n        \"> [0, 0, 0, 9, 12, 8] => \\\"00<100\\\"\\n\",\n        \"\\n\",\n        \"2) Slide the carry coefficients\\n\",\n        \"\\n\",\n        \"> \\\"00<100\\\" => 001100\\\"\\n\",\n        \"\\n\",\n        \"3) Complete the addition.\\n\",\n        \"\\n\",\n        \"Each of these is 1 line of code. \"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"11b27d5b\",\n      \"metadata\": {\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 96\n        },\n        \"id\": \"11b27d5b\",\n        \"outputId\": \"b1224ef6-c889-40ab-f051-fd00e37ceb2a\"\n      },\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"[1, 3, 2, 1]\"\n            ],\n            \"image/svg+xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\\n<svg baseProfile=\\\"full\\\" height=\\\"75.0\\\" version=\\\"1.1\\\" width=\\\"175\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:ev=\\\"http://www.w3.org/2001/xml-events\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><marker id=\\\"arrow\\\" markerHeight=\\\"3.5\\\" markerWidth=\\\"5\\\" orient=\\\"auto\\\" refX=\\\"5.0\\\" refY=\\\"1.7\\\"><polygon points=\\\"0,0 5,1.75 0,3.5\\\" /></marker></defs><g style=\\\"fill:white;\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 87.5, 37.5)\\\"><g transform=\\\"matrix(23.809523809523807, 0.0, 0.0, 23.809523809523807, 0.0, 0.0)\\\"><g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -0.0, -0.0)\\\"><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, -2.0, -1.0)\\\"><g><g><g><g><g><g style=\\\"fill: #1d7874;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">Input</text></g><g /></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g></g></g><g style=\\\"stroke: black;stroke-width: 0.9;\\\" transform=\\\"matrix(0.0, -1.0, 1.0, 0.0, 0.0, 1.0)\\\"><g /></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 2.0)\\\"><g><g><g><g style=\\\"fill: #1d7874;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">Final</text></g><g /></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g><g><g><g><g><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">3</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 1.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">2</text></g><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 2.5, 0.0)\\\"><g transform=\\\"matrix(1.0, -0.0, 0.0, 1.0, 0.0, 0.0)\\\"><g /></g></g></g><g transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 3.0, 0.0)\\\"><g><g style=\\\"fill: #000000;stroke: black;stroke-width: 0.0;\\\" transform=\\\"matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)\\\"><text style=\\\"text-align:center; text-anchor:middle; dominant-baseline:middle;&#10;                      font-family:sans-serif; font-weight: bold;&#10;                      font-size:0.85px;&#10;                      vector-effect: non-scaling-stroke;\\\" transform=\\\"translate(-5e-05, 0)\\\">1</text></g><g /></g></g></g></g></g></g></g></g></g><g /></g></g></g></g></svg>\"\n          },\n          \"metadata\": {},\n          \"execution_count\": 32\n        }\n      ],\n      \"source\": [\n        \"# The function atoi lets us convert from string to sequences of integers\\n\",\n        \"atoi(tokens).input(\\\"1321\\\")\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"3370d2c8\",\n      \"metadata\": {\n        \"id\": \"3370d2c8\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def add_spec(seq):\\n\",\n        \"    a, b = \\\"\\\".join(seq).split(\\\"+\\\")\\n\",\n        \"    c = int(a) + int(b)\\n\",\n        \"    out = f\\\"{c}\\\"\\n\",\n        \"    return list(map(int, list((\\\"0\\\" * (len(seq) - len(out))) + out)))\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"98a331c6\",\n      \"metadata\": {\n        \"id\": \"98a331c6\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"def add(seq=tokens):\\n\",\n        \"    x = atoi(split(\\\"+\\\", True, seq)) \\\\\\n\",\n        \"        + atoi(split(\\\"+\\\", False, seq))\\n\",\n        \"    # 1) Check for carries \\n\",\n        \"    gets_carry = shift(-1, \\\"0\\\", where(x > 9, \\\"1\\\", where(x == 9, \\\"<\\\", \\\"0\\\")))\\n\",\n        \"    # 2) Slide carries to their columns - all in one parallel go!                                         \\n\",\n        \"    gets_carry = atoi(slide(\\\"<\\\", gets_carry))\\n\",\n        \"    # 3) Add in carries, and remove overflow from original addition.                                                                               \\n\",\n        \"    return (x + gets_carry) % 10\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"id\": \"7f1f708c\",\n      \"metadata\": {\n        \"id\": \"7f1f708c\"\n      },\n      \"outputs\": [],\n      \"source\": [\n        \"test_output(add, add_spec,\\n\",\n        \"            [(list(\\\"1+2\\\"),),\\n\",\n        \"             (list(\\\"22+384\\\"),),\\n\",\n        \"             (list(\\\"3+10\\\"),)]\\n\",\n        \"             )\"\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"raspy\",\n      \"language\": \"python\",\n      \"name\": \"raspy\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.10.6\"\n    },\n    \"colab\": {\n      \"provenance\": [],\n      \"include_colab_link\": true\n    }\n  },\n  \"nbformat\": 4,\n  \"nbformat_minor\": 5\n}"
  }
]