code: func (mi *MemoryIndex) GetCommitDataByIndex(i int) (*CommitData, error) {
  	if int(i) >= len(mi.commitData) {
  		return nil, plumbing.ErrObjectNotFound
  	}
  
  	commitData := mi.commitData[i]
  
  	// Map parent hashes to parent indexes
  	if commitData.ParentIndexes == nil {
  		parentIndexes := make([]int, len(commitData.ParentHashes))
  		for i, parentHash := range commitData.ParentHashes {
  			var err error
  			if parentIndexes[i], err = mi.GetIndexByHash(parentHash); err != nil {
  				return nil, err
  			}
  		}
  		commitData.ParentIndexes = parentIndexes
  	}
  
  	return commitData, nil
  }
docs: // GetCommitDataByIndex gets the commit node from the commit graph using index
  // obtained from child node, if available