To add a custom metric or test, you need to directly implement the calculation method and (optional) visualization.
You can use the metrics and tests that exist in the codebase as an example.
Note: this is advanced functionality that expects you to be able to work with the codebase independently. To implement the visualization, you should be familiar with Plotly.
This example Jupyter notebook shows how to implement a simple metric and test and include them in a custom Report and Test Suite: