code: def searchAccession(acc):
      
      # try genbank file
      # genome database
      out, error = entrez('genome', acc)
      for line in out.splitlines():
          line = line.decode('ascii').strip()
          if 'Assembly_Accession' in line or 'BioSample' in line:
              newAcc = line.split('>')[1].split('<')[0].split('.')[0].split(',')[0]
              if len(newAcc) > 0:
                  return (True, acc, newAcc)
      # nucleotide database
      out, error = entrez('nucleotide', acc)
      for line in out.splitlines():
          line = line.decode('ascii').strip()
          if 'Assembly_Accession' in line or 'BioSample' in line:
              newAcc = line.split('>')[1].split('<')[0].split('.')[0].split(',')[0]
              if len(newAcc) > 0:
                  return (True, acc, newAcc)
      # assembly database
      out, error = entrez('assembly', acc)
      for line in out.splitlines():
          line = line.decode('ascii').strip()
          if 'Assembly_Accession' in line or 'BioSample' in line:
              newAcc = line.split('>')[1].split('<')[0].split('.')[0].split(',')[0]
              if len(newAcc) > 0:
                  return (True, acc, newAcc)
      for error in error.splitlines():
          error = error.decode('ascii').strip()
          if '500 Can' in error:
              return (False, acc, 'no network')
      return (False, acc, 'efetch failed')
docs: attempt to use NCBI Entrez to get
      BioSample ID