I'd like to use batch normalization in TensorFlow and came across this `batch_normalize` function on the GitHub: [link](https://github.com/tensorflow/tensorflow/blob/e8494eacfb552c4bf33c15657238aabecc2a6343/tensorflow/contrib/learn/python/learn/ops/batch_norm_ops.py "link")

I noticed that there is a specific flag to check whether we are training or not. However, I'm not familiar with how to set this flag to True or False, and is it standard to set this *particular* flag when training? The line that I am referring to is here:

`is_training = array_ops_.squeeze(ops.get_collection("IS_TRAINING"))`

**To summarize my question**: How do I set this flag to True/False so that I can use this `batch_normalize` function?

Thanks!