Task Description: Implement a Basic Calculator Functionality
You are required to create a basic calculator that performs the four fundamental arithmetic operations: addition, subtraction, multiplication, and division. This calculator will be implemented in a single function named calculate.
Requirements:
Create a function calculate in the file /app/calculator.py that takes three parameters:
operand1 (float): The first number in the operation.
operand2 (float): The second number in the operation.
operation (str): A string that specifies the operation to perform. It can be one of the following: "add", "subtract", "multiply", or "divide".
The function should return the result of the arithmetic operation based on the operation parameter:
If operation is "add", return the sum of operand1 and operand2.
If operation is "subtract", return the difference of operand1 and operand2.
If operation is "multiply", return the product of operand1 and operand2.
If operation is "divide":
Return None if operand2 is zero to avoid division by zero.
Otherwise, return the quotient of operand1 divided by operand2.
Ensure the function handles invalid operations by returning None.
Write the implementation so that it passes the provided test cases, which will include tests for each of the operations, as well as cases for invalid operations and division by zero.
Make sure to include documentation in your code to explain how the function works.