def METHOD_NAME(stage, lock_data=None):
    """Fill values for params, checksums for outs and deps from lock."""
    if not lock_data:
        return
    from dvc.output import Output, merge_file_meta_from_cloud
    assert isinstance(lock_data, dict)
    items: Iterable[Tuple[str, "Output"]] = chain(
        ((StageParams.PARAM_DEPS, dep) for dep in stage.deps),
        ((StageParams.PARAM_OUTS, out) for out in stage.outs),
    )
    checksums = {
        key: {item["path"]: item for item in lock_data.get(key, {})}
        for key in [StageParams.PARAM_DEPS, StageParams.PARAM_OUTS]
    }
    for key, item in items:
        path = item.def_path
        if isinstance(item, dependency.ParamsDependency):
            item.fill_values(get_in(lock_data, [stage.PARAM_PARAMS, path]))
            continue
        info = get_in(checksums, [key, path], {})
        info = info.copy()
        info.pop("path", None)
        hash_name = info.pop(Output.PARAM_HASH, None)
        item.meta = Meta.from_dict(merge_file_meta_from_cloud(info))
        # pylint: disable-next=protected-access
        item.hash_name, item.hash_info = item._compute_hash_info_from_meta(
            hash_name
        )
        files = get_in(checksums, [key, path, item.PARAM_FILES], None)
        if files:
            item.files = [merge_file_meta_from_cloud(f) for f in files]
        # pylint: disable-next=protected-access
        item._compute_meta_hash_info_from_files()