Verify that definitions of data sources and return values comply with the expectations embodied in your code during composition and review.

To inspect a Python function f for semantic annotations about the sort of data it uses and produces, at the Python interactive terminal use:

>>> f.adihelp()

or

>>> import adilib
>>> from adilib import adihelp
>>> adihelp(f)

Just like with the ordinary help() function, adihelp() renders documentation to the system pager, e.g. less. For example:

>>> adihelp(find_average)
find_average(cell_protein_expression, tissue_slide_region) -> cell_metric
    Cell protein expression: Expression level measurements for proteins in or on a given cell.
        Attributes: *Cell*, *Gene*, *Protein expression quantification*
    Tissue slide region: A slide region defined by anatomical criteria.
        Attributes: *Slide*, *Tissue anatomical region*
    Cell metric: Quantification statistic over a cell population in a given region.
        Attributes: *Tissue slide region*, *Quantification*

You can also access annotations of named items directly:

>>> adihelp('Tissue anatomical region')
Tissue anatomical region: Anatomical entity representing a kind of tissue to be found there.
    Values: *Stroma*, *Tumor*, *Epithelium*, *Basement membrane*