code: func getEmulatedBuild(c context.Context, id buildbot.BuildID, fetchAnnotations, fetchChanges bool) (*buildbot.Build, error) {
  	if err := id.Validate(); err != nil {
  		return nil, err
  	}
  
  	buildbucketBuild, err := EmulationOf(c, id)
  	switch {
  	case err != nil:
  		return nil, err
  	case buildbucketBuild == nil:
  		return nil, nil
  	}
  
  	buildbotBuild, err := buildFromBuildbucket(c, id.Master, buildbucketBuild, fetchAnnotations)
  	switch {
  	case ErrNoBuildNumber.In(err):
  		// This is an old buildbucket build without a build number.  Just drop it.
  		// All emulated builds should have a build number.
  		return nil, nil
  	case err != nil:
  		return nil, err
  	}
  
  	if fetchChanges {
  		if err := blame(c, buildbotBuild); err != nil {
  			return nil, err
  		}
  	}
  
  	return buildbotBuild, nil
  }
docs: // getEmulatedBuild returns a buildbot build derived from a LUCI build.
  // Returns (nil, nil) if build is not found.