does this need to be in a separate function? if there's not a clear advantage, lets avoid adding another stack frame.
excessive function calls can be a performance killer in python