def check_samples_slot(value):
    if not value:
        return 'after-docstring'
    val = directives.choice(
        value,
        ('none',              # do not include
         'before-docstring',  # show samples then docstring
         'after-docstring',   # show docstring then samples
         ))
    return val
Validate the samples_slot option to the TypeDocumenter.
dataset/ETHPy150Open openstack/wsme/wsmeext/sphinxext.py/check_samples_slot