prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  st.expander cuts off sliders
  # Summary
  
  Expander in sidebar cuts off sliders and potentially other stuff
  
  # Steps to reproduce
  Run the following code
  ```
  import streamlit as st
  
  sidebar_expander = st.sidebar.beta_expander("Bad sliders underneath!")
  with sidebar_expander:
      st.slider("Bad layout slider 1", 0, 100, value=0)
      st.slider("Bad layout slider 2", 0, 100, value=(0,100))
  
  st.sidebar.slider("Good layout slider")
  ```
  ## Expected behavior:
  
  Sliders appear nicely under the expander
  
  ## Actual behavior:
  
  Sliders ends are cut off under the expander (see picture)
  
  ![image](https://user-images.githubusercontent.com/62385461/96776145-e4638580-13e8-11eb-9eaf-692c45541cf1.png)
  
  
  ## Is this a regression?
  
  No
  
  # Debug info
  
  - Streamlit version:  0.69.1
  - Python version: 3.8.2
  - Using PipEnv
  - OS version: Windows 10
  - Browser version: Firefox and Chrome, recent versions
  
  # Additional information
  
  May also happen in containers outside of sidebar? Have not checked it though..
  
  </issue>
  <code>
  [start of e2e/scripts/st_expander.py]
  1 # Copyright 2018-2020 Streamlit Inc.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #    http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 import streamlit as st
  16 
  17 container = st.beta_container()
  18 container.write("I cannot collapse")
  19 
  20 expander = st.beta_expander("Collapse me!", expanded=True)
  21 expander.write("I can collapse")
  22 
  23 collapsed = st.beta_expander("Expand me!")
  24 collapsed.write("I am already collapsed")
  25 
  26 sidebar = st.sidebar.beta_expander("Expand me!")
  27 sidebar.write("I am in the sidebar")
  28
  [end of e2e/scripts/st_expander.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/e2e/scripts/st_expander.py b/e2e/scripts/st_expander.py
  --- a/e2e/scripts/st_expander.py
  +++ b/e2e/scripts/st_expander.py
  @@ -19,6 +19,8 @@
   
   expander = st.beta_expander("Collapse me!", expanded=True)
   expander.write("I can collapse")
  +expander.slider("I don't get cut off")
  +expander.button("I'm also not cut off (while focused)")
   
   collapsed = st.beta_expander("Expand me!")
   collapsed.write("I am already collapsed")
  
verification_info: {"golden_diff": "diff --git a/e2e/scripts/st_expander.py b/e2e/scripts/st_expander.py\n--- a/e2e/scripts/st_expander.py\n+++ b/e2e/scripts/st_expander.py\n@@ -19,6 +19,8 @@\n \n expander = st.beta_expander(\"Collapse me!\", expanded=True)\n expander.write(\"I can collapse\")\n+expander.slider(\"I don't get cut off\")\n+expander.button(\"I'm also not cut off (while focused)\")\n \n collapsed = st.beta_expander(\"Expand me!\")\n collapsed.write(\"I am already collapsed\")\n", "issue": "st.expander cuts off sliders\n# Summary\r\n\r\nExpander in sidebar cuts off sliders and potentially other stuff\r\n\r\n# Steps to reproduce\r\nRun the following code\r\n```\r\nimport streamlit as st\r\n\r\nsidebar_expander = st.sidebar.beta_expander(\"Bad sliders underneath!\")\r\nwith sidebar_expander:\r\n    st.slider(\"Bad layout slider 1\", 0, 100, value=0)\r\n    st.slider(\"Bad layout slider 2\", 0, 100, value=(0,100))\r\n\r\nst.sidebar.slider(\"Good layout slider\")\r\n```\r\n## Expected behavior:\r\n\r\nSliders appear nicely under the expander\r\n\r\n## Actual behavior:\r\n\r\nSliders ends are cut off under the expander (see picture)\r\n\r\n![image](https://user-images.githubusercontent.com/62385461/96776145-e4638580-13e8-11eb-9eaf-692c45541cf1.png)\r\n\r\n\r\n## Is this a regression?\r\n\r\nNo\r\n\r\n# Debug info\r\n\r\n- Streamlit version:  0.69.1\r\n- Python version: 3.8.2\r\n- Using PipEnv\r\n- OS version: Windows 10\r\n- Browser version: Firefox and Chrome, recent versions\r\n\r\n# Additional information\r\n\r\nMay also happen in containers outside of sidebar? Have not checked it though..\n", "before_files": [{"content": "# Copyright 2018-2020 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport streamlit as st\n\ncontainer = st.beta_container()\ncontainer.write(\"I cannot collapse\")\n\nexpander = st.beta_expander(\"Collapse me!\", expanded=True)\nexpander.write(\"I can collapse\")\n\ncollapsed = st.beta_expander(\"Expand me!\")\ncollapsed.write(\"I am already collapsed\")\n\nsidebar = st.sidebar.beta_expander(\"Expand me!\")\nsidebar.write(\"I am in the sidebar\")\n", "path": "e2e/scripts/st_expander.py"}]}