<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _nameFromHeaderInfo(headerInfo, isDecoy, decoyTag):
 """Generates a protein name from headerInfo. If "isDecoy" is True, the "decoyTag" is added to beginning of the generated protein name. :param headerInfo: dict, must contain a key "name" or "id" :param isDecoy: bool, determines if the "decoyTag" is added or not. :param decoyTag: str, a tag that identifies decoy / reverse protein entries. :returns: str, protein name """

    if 'name' in headerInfo:
        proteinName = headerInfo['name']
    else:
        proteinName = headerInfo['id']
    if isDecoy:
        proteinName = ''.join((decoyTag, proteinName))

    return proteinName