请您以Python代码的形式输出一个函数，该函数用于绘制一个长度为10的随机二进制序列，并且必须包含至少3个0和至少3个1。
user
```python
import random

def generate_binary_sequence():
    while True:
        sequence = [random.choice([0, 1]) for _ in range(10)]
        if sequence.count(0) >= 3 and sequence.count(1) >= 3:
            return sequence

# 示例调用
print(generate_binary_sequence())
```
assistant