''' Write a function that takes a DNA sequence (a string of characters A, T, C, G) and returns a dictionary with the counts of each nucleotide. Handle invalid characters by ignoring them. Provide an option to return the counts as a percentage of the total number of nucleotides. Example outputs: dna_count("ATCGATCGAATCGA") # Returns {'A': 5, 'T': 3, 'C': 4, 'G': 3} dna_count("ATCGATCGAATCGA", percent=True) # Returns {'A': 35.7, 'T': 21.4, 'C': 28.6, 'G': 21.4} ''' # Your code here