<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _is_umi_consensus_bam(in_file):
 """Check if input BAM file generated by fgbio consensus calls on UMIs. Identify these by lack of duplicated reads. This is useful for pre-aligned consensus BAMs feeding into octopus. """

    cmd = "samtools view -h %s | head -500000 | samtools view -c -f 1024"
    count = subprocess.check_output(cmd % in_file, shell=True)
    return int(count) == 0