<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def blastdb(fasta, maxfile = 10000000):
 """ make blast db """

    db = fasta.rsplit('.', 1)[0]
    type = check_type(fasta)
    if type == 'nucl':
        type = ['nhr', type]
    else:
        type = ['phr', type]
    if os.path.exists('%s.%s' % (db, type[0])) is False \
            and os.path.exists('%s.00.%s' % (db, type[0])) is False:
        print('# ... making blastdb for: %s' % (fasta), file=sys.stderr)
        os.system('makeblastdb \
                -in %s -out %s -dbtype %s -max_file_sz %s >> log.txt' \
                % (fasta, db, type[1], maxfile))
    else:
        print('# ... database found for: %s' % (fasta), file=sys.stderr)
    return db