@hep.over('<STR_LIT>', '<STR_LIT>')<EOL>@hepnames.over('<STR_LIT>', '<STR_LIT>')<EOL>def acquisition_source(self, key, value):
def _get_datetime(value):<EOL><INDENT>d_value = force_single_element(value.get('<STR_LIT:d>', '<STR_LIT>'))<EOL>if d_value:<EOL><INDENT>try:<EOL><INDENT>date = PartialDate.loads(d_value)<EOL><DEDENT>except ValueError:<EOL><INDENT>return d_value<EOL><DEDENT>else:<EOL><INDENT>datetime_ = datetime(year=date.year, month=date.month, day=date.day)<EOL>return datetime_.isoformat()<EOL><DEDENT><DEDENT><DEDENT>internal_uid, orcid, source = None, None, None<EOL>a_values = force_list(value.get('<STR_LIT:a>'))<EOL>for a_value in a_values:<EOL><INDENT>if IS_INTERNAL_UID.match(a_value):<EOL><INDENT>if a_value.startswith('<STR_LIT>'):<EOL><INDENT>internal_uid = int(a_value[<NUM_LIT:12>:])<EOL><DEDENT>else:<EOL><INDENT>internal_uid = int(a_value)<EOL><DEDENT><DEDENT>elif IS_ORCID.match(a_value):<EOL><INDENT>if a_value.startswith('<STR_LIT>'):<EOL><INDENT>orcid = a_value[<NUM_LIT:6>:]<EOL><DEDENT>else:<EOL><INDENT>orcid = a_value<EOL><DEDENT><DEDENT>else:<EOL><INDENT>source = a_value<EOL><DEDENT><DEDENT>c_value = force_single_element(value.get('<STR_LIT:c>', '<STR_LIT>'))<EOL>normalized_c_value = c_value.lower()<EOL>if normalized_c_value == '<STR_LIT>':<EOL><INDENT>method = '<STR_LIT>'<EOL><DEDENT>elif normalized_c_value == '<STR_LIT>':<EOL><INDENT>method = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>method = normalized_c_value<EOL><DEDENT>return {<EOL>'<STR_LIT>': _get_datetime(value),<EOL>'<STR_LIT:email>': value.get('<STR_LIT:b>'),<EOL>'<STR_LIT>': internal_uid,<EOL>'<STR_LIT>': method,<EOL>'<STR_LIT>': orcid,<EOL>'<STR_LIT:source>': source,<EOL>'<STR_LIT>': value.get('<STR_LIT:e>'),<EOL>}<EOL>
Populate the ``acquisition_source`` key.