def experiments(auth, label=None, project=None, subject=None):
if subject and (label or project):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>url = '<STR_LIT>'.format(auth.url.rstrip('<STR_LIT:/>'))<EOL>logger.debug('<STR_LIT>', url)<EOL>columns = [<EOL>'<STR_LIT>',<EOL>'<STR_LIT:label>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'<EOL>]<EOL>payload = {<EOL>'<STR_LIT>': '<STR_LIT:U+002C>'.join(columns)<EOL>}<EOL>if label:<EOL><INDENT>payload['<STR_LIT:label>'] = label<EOL><DEDENT>if project:<EOL><INDENT>payload['<STR_LIT>'] = project<EOL><DEDENT>if subject:<EOL><INDENT>payload['<STR_LIT>'] = subject.project<EOL>payload['<STR_LIT>'] = subject.id<EOL><DEDENT>r = requests.get(url, params=payload, auth=(auth.username, auth.password), <EOL>verify=CHECK_CERTIFICATE)<EOL>if r.status_code != requests.codes.ok:<EOL><INDENT>raise AccessionError('<STR_LIT>'.format(r.status_code, r.url))<EOL><DEDENT>try:<EOL><INDENT>results = r.json()<EOL>__quick_validate(results)<EOL><DEDENT>except ResultSetError as e:<EOL><INDENT>raise ResultSetError('<STR_LIT>'.format(e.message, r.url))<EOL><DEDENT>results = results['<STR_LIT>']<EOL>if int(results['<STR_LIT>']) == <NUM_LIT:0>:<EOL><INDENT>raise NoExperimentsError('<STR_LIT>'.format(r.url))<EOL><DEDENT>for item in results['<STR_LIT>']:<EOL><INDENT>yield Experiment(uri=item['<STR_LIT>'], <EOL>id=item['<STR_LIT>'], <EOL>project=item['<STR_LIT>'], <EOL>label=item['<STR_LIT:label>'], <EOL>subject_id=item['<STR_LIT>'], <EOL>subject_label=item['<STR_LIT>'], <EOL>archived_date=item['<STR_LIT>'])<EOL><DEDENT>
Retrieve Experiment tuples for experiments returned by this function.

Example:
    >>> import yaxil
    >>> auth = yaxil.XnatAuth(url='...', username='...', password='...')
    >>> yaxil.experiment(auth, 'AB1234C')
    Experiment(uri=u'/data/experiments/XNAT_E0001', label=u'AB1234C', id=u'XNAT_E0001', 
        project=u'MyProject', subject_id=u'XNAT_S0001', subject_label='ABC')

:param auth: XNAT authentication
:type auth: :mod:`yaxil.XnatAuth`
:param label: XNAT Experiment label
:type label: str
:param project: XNAT Experiment Project
:type project: str
:param subject: YAXIL Subject
:type subject: :mod:`yaxil.Subject`
:returns: Experiment object
:rtype: :mod:`yaxil.Experiment`