def _GetAllowableIndentations(self):
    expected = set([0])
    hard_stops = set([])

    # Whether the tokens are still in the same continuation, meaning additional
    # indentation is optional.  As an example:
    # x = 5 +
    #     6 +
    #     7;
    # The second '+' does not add any required indentation.
    in_same_continuation = False

    for token_info in self._stack:
      token = token_info.token

      # Handle normal additive indentation tokens.
      if not token_info.overridden_by and token.string != 'return':
        if token_info.is_block:
          expected = self._AddToEach(expected, 2)
          hard_stops = self._AddToEach(hard_stops, 2)
          in_same_continuation = False
        elif in_same_continuation:
          expected |= self._AddToEach(expected, 4)
          hard_stops |= self._AddToEach(hard_stops, 4)
        else:
          expected = self._AddToEach(expected, 4)
          hard_stops |= self._AddToEach(hard_stops, 4)
          in_same_continuation = True

      # Handle hard stops after (, [, return, =, and ?
      if self._IsHardStop(token):
        override_is_hard_stop = (token_info.overridden_by and
                                 self._IsHardStop(
                                     token_info.overridden_by.token))
        if token.type == Type.START_PAREN and token.previous:
          # For someFunction(...) we allow to indent at the beginning of the
          # identifier +4
          prev = token.previous
          if (prev.type == Type.IDENTIFIER and
              prev.line_number == token.line_number):
            hard_stops.add(prev.start_index + 4)
        if not override_is_hard_stop:
          start_index = token.start_index
          if token.line_number in self._start_index_offset:
            start_index += self._start_index_offset[token.line_number]
          if (token.type in (Type.START_PAREN, Type.START_PARAMETERS) and
              not token_info.overridden_by):
            hard_stops.add(start_index + 1)

          elif token.string == 'return' and not token_info.overridden_by:
            hard_stops.add(start_index + 7)

          elif token.type == Type.START_BRACKET:
            hard_stops.add(start_index + 1)

          elif token.IsAssignment():
            hard_stops.add(start_index + len(token.string) + 1)

          elif token.IsOperator('?') and not token_info.overridden_by:
            hard_stops.add(start_index + 2)

    return (expected | hard_stops) or set([0])
Overrides abstract function in stacker class. Called in Stacker.stack_derived() function. 
dataset/ETHPy150Open google/closure-linter/closure_linter/indentation.py/IndentationRules._GetAllowableIndentations--crossover with--dataset/ETHPy150Open GeoscienceAustralia/agdc/examples/ndvi_stacker.py/NDVIStacker.derive_datasets