docs: def _make_info(self, piece_size, progress, walker, piece_callback=None):
          """ Create info dict.
          """
          # These collect the file descriptions and piece hashes
          file_list = []
          pieces = []
  
          # Initialize progress state
          hashing_secs = time.time()
          totalsize = -1 if self._fifo else self._calc_size()
          totalhashed = 0
  
          # Start a new piece
          sha1sum = hashlib.sha1()
          done = 0
          filename = None
  
          # Hash all files
          for filename in walker:
              # Assemble file info
              filesize = os.path.getsize(filename)
              filepath = filename[len(os.path.dirname(self.datapath) if self._fifo else self.datapath):].lstrip(os.sep)
              file_list.append({
                  "length": filesize,
                  "path": [fmt.to_utf8(x) for x in fmt.to_unicode(filepath).replace(os.sep, '/').split('/')],
              })
              self.LOG.debug("Hashing %r, size %d..." % (filename, filesize))
  
              # Open file and hash it
              fileoffset = 0
              handle = open(filename, "rb")
              try:
                  while fileoffset < filesize:
                      # Read rest of piece or file, whatever is smaller
                      chunk = handle.read(min(filesize - fileoffset, piece_size - done))
                      sha1sum.update(chunk) # bogus pylint: disable=E1101
                      done += len(chunk)
                      fileoffset += len(chunk)
                      totalhashed += len(chunk)
  
                      # Piece is done
                      if done == piece_size:
                          pieces.append(sha1sum.digest()) # bogus pylint: disable=E1101
                          if piece_callback:
                              piece_callback(filename, pieces[-1])
  
                          # Start a new piece
                          sha1sum = hashlib.sha1()
                          done = 0
  
                      # Report progress
                      if progress:
                          progress(totalhashed, totalsize)
              finally:
                  handle.close()
  
          # Add hash of partial last piece
          if done > 0:
              pieces.append(sha1sum.digest()) # bogus pylint: disable=E1103
              if piece_callback:
                  piece_callback(filename, pieces[-1])
  
          # Build the meta dict
          metainfo = {
              "pieces": b"".join(pieces),
              "piece length": piece_size,
              "name": os.path.basename(self.datapath),
          }
  
          # Handle directory/FIFO vs. single file
          if self._fifo or os.path.isdir(self.datapath):
              metainfo["files"] = file_list
          else:
              metainfo["length"] = totalhashed
  
          hashing_secs = time.time() - hashing_secs
          self.LOG.info("Hashing of %s took %.1f secs (%s/s)" % (
              fmt.human_size(totalhashed).strip(), hashing_secs, fmt.human_size(totalhashed / hashing_secs).strip(),
          ))
  
          # Return validated info dict
          return check_info(metainfo), totalhashed