Title: Implement ead(fo2, depth) in lib with tests and documentation
Description:
Objective: Implement the function ead(fo2, depth) in the Python package lib so that provided tests pass, and ensure the function is well-documented and robust.
Location: Create or update lib/init.py and export the function so tests using from lib import * can access ead.
Function signature: def ead(fo2, depth) -> int
Behavior:
If fo2 <= 21, return depth unchanged.
If fo2 > 21, return int(depth * 0.9) (i.e., 90% of depth, as an integer).
Type handling:
Accept numeric inputs (ints or floats) for fo2 and depth.
If inputs are not numeric, raise a TypeError.
When depth is an integer, the result should be an integer (as shown by tests).
Documentation:
Include a concise docstring describing the purpose and the exact threshold and calculation.
Include a brief example in the docstring showing behavior for fo2 = 21 and fo2 = 28.
Export semantics:
Ensure all includes 'ead' (or that ead is otherwise accessible via "from lib import *").
Acceptance criteria:
Running the provided tests should yield all tests passing, with ead(21, 10) == 10, ead(21, 20) == 20, ead(28, 20) == 18, ead(28, 30) == 27, etc.
Tests to consider (implied by acceptance criteria):
ead(21, 10) -> 10
ead(21, 20) -> 20
ead(28, 20) -> 18
ead(28, 30) -> 27
Non-numeric fo2 or depth should raise TypeError
Non-integer depth yields an integer result after applying the calculation (due to int cast)
Steps to reproduce:
Set up the repository with a Python package named lib (create or update lib/init.py as needed).
Implement ead(fo2, depth) according to the above specification and export it (update all or ensure from lib import * exposes ead).
Run the test suite (e.g., pytest or the project’s provided test command).
Verify that all tests pass, including cases like ead(21, 10) == 10, ead(21, 20) == 20, ead(28, 20) == 18, ead(28, 30) == 27, and TypeError for non-numeric inputs.