docs: def construct_entry_with_release(focus, issues, manager, log, releases, rest):
      """
      Releases 'eat' the entries in their line's list and get added to the
      final data structure. They also inform new release-line 'buffers'.
      Release lines, once the release obj is removed, should be empty or a
      comma-separated list of issue numbers.
      """
      log("release for line %r" % focus.minor)
      # Check for explicitly listed issues first
      explicit = None
      if rest[0].children:
          explicit = [x.strip() for x in rest[0][0].split(',')]
      # Do those by themselves since they override all other logic
      if explicit:
          log("Explicit issues requested: %r" % (explicit,))
          # First scan global issue dict, dying if not found
          missing = [i for i in explicit if i not in issues]
          if missing:
              raise ValueError(
                  "Couldn't find issue(s) #{} in the changelog!".format(
                      ', '.join(missing)))
          # Obtain the explicitly named issues from global list
          entries = []
          for i in explicit:
              for flattened_issue_item in itertools.chain(issues[i]):
                  entries.append(flattened_issue_item)
          # Create release
          log("entries in this release: %r" % (entries,))
          releases.append({
              'obj': focus,
              'entries': entries,
          })
          # Introspect these entries to determine which buckets they should get
          # removed from (it's not "all of them"!)
          for obj in entries:
              if obj.type == 'bug':
                  # Major bugfix: remove from unreleased_feature
                  if obj.major:
                      log("Removing #%s from unreleased" % obj.number)
                      # TODO: consider making a LineManager method somehow
                      manager[focus.family]['unreleased_feature'].remove(obj)
                  # Regular bugfix: remove from bucket for this release's
                  # line + unreleased_bugfix
                  else:
                      if obj in manager[focus.family]['unreleased_bugfix']:
                          log("Removing #%s from unreleased" % obj.number)
                          manager[focus.family]['unreleased_bugfix'].remove(obj)
                      if obj in manager[focus.family][focus.minor]:
                          log("Removing #%s from %s" % (obj.number, focus.minor))
                          manager[focus.family][focus.minor].remove(obj)
              # Regular feature/support: remove from unreleased_feature
              # Backported feature/support: remove from bucket for this
              # release's line (if applicable) + unreleased_feature
              else:
                  log("Removing #%s from unreleased" % obj.number)
                  manager[focus.family]['unreleased_feature'].remove(obj)
                  if obj in manager[focus.family].get(focus.minor, []):
                      manager[focus.family][focus.minor].remove(obj)
  
      # Implicit behavior otherwise
      else:
          # Unstable prehistory -> just dump 'unreleased' and continue
          if manager.unstable_prehistory:
              # TODO: need to continue making LineManager actually OO, i.e. do
              # away with the subdicts + keys, move to sub-objects with methods
              # answering questions like "what should I give you for a release"
              # or whatever
              log("in unstable prehistory, dumping 'unreleased'")
              releases.append({
                  'obj': focus,
                  # NOTE: explicitly dumping 0, not focus.family, since this
                  # might be the last pre-historical release and thus not 0.x
                  'entries': manager[0]['unreleased'][:],
              })
              manager[0]['unreleased'] = []
              # If this isn't a 0.x release, it signals end of prehistory, make a
              # new release bucket (as is also done below in regular behavior).
              # Also acts like a sentinel that prehistory is over.
              if focus.family != 0:
                  manager[focus.family][focus.minor] = []
          # Regular behavior from here
          else:
              # New release line/branch detected. Create it & dump unreleased
              # features.
              if focus.minor not in manager[focus.family]:
                  log("not seen prior, making feature release & bugfix bucket")
                  manager[focus.family][focus.minor] = []
                  # TODO: this used to explicitly say "go over everything in
                  # unreleased_feature and dump if it's feature, support or major
                  # bug". But what the hell else would BE in unreleased_feature?
                  # Why not just dump the whole thing??
                  #
                  # Dump only the items in the bucket whose family this release
                  # object belongs to, i.e. 1.5.0 should only nab the 1.0
                  # family's unreleased feature items.
                  releases.append({
                      'obj': focus,
                      'entries': manager[focus.family]['unreleased_feature'][:],
                  })
                  manager[focus.family]['unreleased_feature'] = []
  
              # Existing line -> empty out its bucket into new release.
              # Skip 'major' bugs as those "belong" to the next release (and will
              # also be in 'unreleased_feature' - so safe to nuke the entire
              # line)
              else:
                  log("pre-existing, making bugfix release")
                  # TODO: as in other branch, I don't get why this wasn't just
                  # dumping the whole thing - why would major bugs be in the
                  # regular bugfix buckets?
                  entries = manager[focus.family][focus.minor][:]
                  releases.append({'obj': focus, 'entries': entries})
                  manager[focus.family][focus.minor] = []
                  # Clean out the items we just released from
                  # 'unreleased_bugfix'.  (Can't nuke it because there might
                  # be some unreleased bugs for other release lines.)
                  for x in entries:
                      if x in manager[focus.family]['unreleased_bugfix']:
                          manager[focus.family]['unreleased_bugfix'].remove(x)