parameters: (has_terminal, batch)
docstring: Check if the environment sent a terminal signal
docstring_summary: Check if the environment sent a terminal signal
docstring_tokens: Check if the environment sent a terminal signal
function: def check_terminals(has_terminal, batch):
      ''' Check if the environment sent a terminal signal '''
      # Block backpropagation if we go pass a terminal node.
      for i, terminal in enumerate(batch["terminal"]):
          if terminal: has_terminal[i] = True
function_tokens: def check_terminals ( has_terminal , batch ) : # Block backpropagation if we go pass a terminal node. for i , terminal in enumerate ( batch [ "terminal" ] ) : if terminal : has_terminal [ i ] = True