human
Solve the following python programming problem given the following code:
def BitStringToByteString(bs) : 
    'Convert a pyasn1.type.univ.BitString object to a string of bytes.' 
    def BitsToInt(bits) : 
        return sum (((v * (2 ** (7 - j))) for (j, v) in enumerate (bits))) 
return str (bytearray ([BitsToInt (bs [BitsToInt : (i + 8)]) for i in range (0, len (bs), 8)])) 

    
    

    Fix the buggy line: return str (bytearray ([BitsToInt (bs [BitsToInt : (i + 8)]) for i in range (0, len (bs), 8)]))
assistant
#Here is Python code to fix the buggy line: return str (bytearray ([BitsToInt (bs [BitsToInt : (i + 8)]) for i in range (0, len (bs), 8)]))
.

return str (bytearray ([BitsToInt (bs [i : (i + 8)]) for i in range (0, len (bs), 8)]))