docs: def add_lines_at(self, anchor, *lines, **kwargs):
          """
          Add lines at a specific location in the file.
          :param anchor: structure_dict|line_str|line_num a reference to where adds should occur
          :param lines: one or more lines to add to the content
          :param replace: if True -- replace the anchor
          :param after: if True -- insert after the anchor (conflicts with "replace")
          """
          assert len(lines) > 0
          replace = kwargs.pop('replace', False)
          after = kwargs.pop('after', False)
          assert not (after and replace)
          assert not kwargs, "Unknown keyword argument(s): {0}".format(kwargs.keys())
  
          # find the line number for the insertion
          df_lines = self.lines
          if isinstance(anchor, int):  # line number, just validate
              assert anchor in range(len(df_lines))
              if replace:
                  del df_lines[anchor]
          elif isinstance(anchor, dict):  # structure
              assert anchor in self.structure, "Current structure does not match: {0}".format(anchor)
              if replace:
                  df_lines[anchor['startline']:anchor['endline'] + 1] = []
              if after:
                  anchor = anchor['endline']
              else:
                  anchor = anchor['startline']
          elif isinstance(anchor, string_types):  # line contents
              matches = [index for index, text in enumerate(df_lines) if text == anchor]
              if not matches:
                  raise RuntimeError("Cannot find line in the build file:\n" + anchor)
              anchor = matches[-1]
              if replace:
                  del df_lines[anchor]
          else:
              raise RuntimeError("Unknown anchor type {0}".format(anchor))
  
          if after:
              # ensure there's a newline on final line
              df_lines[anchor] = _endline(df_lines[anchor])
              anchor += 1
  
          df_lines[anchor:anchor] = [_endline(line) for line in lines]
          self.lines = df_lines