prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  beta
  
  
  </issue>
  <code>
  [start of ivy/functional/frontends/jax/random.py]
  1 # local
  2 import ivy
  3 from ivy.functional.frontends.jax.func_wrapper import (
  4     to_ivy_arrays_and_back,
  5     handle_jax_dtype,
  6 )
  7 
  8 
  9 @to_ivy_arrays_and_back
  10 def PRNGKey(seed):
  11     return ivy.array([0, seed % 4294967295 - (seed // 4294967295)], dtype=ivy.int64)
  12 
  13 
  14 @handle_jax_dtype
  15 @to_ivy_arrays_and_back
  16 def uniform(key, shape=(), dtype=None, minval=0.0, maxval=1.0):
  17     return ivy.random_uniform(
  18         low=minval, high=maxval, shape=shape, dtype=dtype, seed=ivy.to_scalar(key[1])
  19     )
  20 
  21 
  22 @handle_jax_dtype
  23 @to_ivy_arrays_and_back
  24 def normal(key, shape=(), dtype=None):
  25     return ivy.random_normal(shape=shape, dtype=dtype, seed=ivy.to_scalar(key[1]))
  26
  [end of ivy/functional/frontends/jax/random.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/ivy/functional/frontends/jax/random.py b/ivy/functional/frontends/jax/random.py
  --- a/ivy/functional/frontends/jax/random.py
  +++ b/ivy/functional/frontends/jax/random.py
  @@ -1,5 +1,6 @@
   # local
   import ivy
  +from ivy.func_wrapper import with_unsupported_dtypes
   from ivy.functional.frontends.jax.func_wrapper import (
       to_ivy_arrays_and_back,
       handle_jax_dtype,
  @@ -23,3 +24,24 @@
   @to_ivy_arrays_and_back
   def normal(key, shape=(), dtype=None):
       return ivy.random_normal(shape=shape, dtype=dtype, seed=ivy.to_scalar(key[1]))
  +
  +
  +def _get_seed(key):
  +    key1, key2 = int(key[0]), int(key[1])
  +    return ivy.to_scalar(int("".join(map(str, [key1, key2]))))
  +
  +
  +@handle_jax_dtype
  +@to_ivy_arrays_and_back
  +@with_unsupported_dtypes(
  +    {
  +        "0.3.14 and below": (
  +            "float16",
  +            "bfloat16",
  +        )
  +    },
  +    "jax",
  +)
  +def beta(key, a, b, shape=None, dtype=None):
  +    seed = _get_seed(key)
  +    return ivy.beta(a, b, shape=shape, dtype=dtype, seed=seed)
  
verification_info: {"golden_diff": "diff --git a/ivy/functional/frontends/jax/random.py b/ivy/functional/frontends/jax/random.py\n--- a/ivy/functional/frontends/jax/random.py\n+++ b/ivy/functional/frontends/jax/random.py\n@@ -1,5 +1,6 @@\n # local\n import ivy\n+from ivy.func_wrapper import with_unsupported_dtypes\n from ivy.functional.frontends.jax.func_wrapper import (\n     to_ivy_arrays_and_back,\n     handle_jax_dtype,\n@@ -23,3 +24,24 @@\n @to_ivy_arrays_and_back\n def normal(key, shape=(), dtype=None):\n     return ivy.random_normal(shape=shape, dtype=dtype, seed=ivy.to_scalar(key[1]))\n+\n+\n+def _get_seed(key):\n+    key1, key2 = int(key[0]), int(key[1])\n+    return ivy.to_scalar(int(\"\".join(map(str, [key1, key2]))))\n+\n+\n+@handle_jax_dtype\n+@to_ivy_arrays_and_back\n+@with_unsupported_dtypes(\n+    {\n+        \"0.3.14 and below\": (\n+            \"float16\",\n+            \"bfloat16\",\n+        )\n+    },\n+    \"jax\",\n+)\n+def beta(key, a, b, shape=None, dtype=None):\n+    seed = _get_seed(key)\n+    return ivy.beta(a, b, shape=shape, dtype=dtype, seed=seed)\n", "issue": "beta\n\n", "before_files": [{"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n    to_ivy_arrays_and_back,\n    handle_jax_dtype,\n)\n\n\n@to_ivy_arrays_and_back\ndef PRNGKey(seed):\n    return ivy.array([0, seed % 4294967295 - (seed // 4294967295)], dtype=ivy.int64)\n\n\n@handle_jax_dtype\n@to_ivy_arrays_and_back\ndef uniform(key, shape=(), dtype=None, minval=0.0, maxval=1.0):\n    return ivy.random_uniform(\n        low=minval, high=maxval, shape=shape, dtype=dtype, seed=ivy.to_scalar(key[1])\n    )\n\n\n@handle_jax_dtype\n@to_ivy_arrays_and_back\ndef normal(key, shape=(), dtype=None):\n    return ivy.random_normal(shape=shape, dtype=dtype, seed=ivy.to_scalar(key[1]))\n", "path": "ivy/functional/frontends/jax/random.py"}]}