code: def _maybe_end_of_stmt_list(attr_value):
      
      if (attr_value is not None) and isinstance(attr_value, Iterable):
        result = list(attr_value)
        if len(result) > 0:
          return result[-1]
      return None
docs: If `attr_value` is a non-empty iterable, return its final element.