docstr: Fill values for params, checksums for outs and deps from lock.
docstr_tok: ["Fill","values","for","params",",","checksums","for","outs","and","deps","from","lock","."]
code: def fill_from_lock(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))
          (
              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
              ]
          item._compute_meta_hash_info_from_files()
  
imports: from collections.abc import Mapping
  from copy import deepcopy
  from itertools import chain
  from typing import TYPE_CHECKING, Any, Dict, Iterable, Optional, Tuple
  from funcy import get_in, lcat, once, project
  from dvc import dependency, output
  from dvc.log import logger
  from dvc.parsing import FOREACH_KWD, JOIN, MATRIX_KWD, EntryNotFound
  from dvc.utils.objects import cached_property
  from dvc_data.hashfile.meta import Meta
  from .None import PipelineStage, Stage, loads_from
  from .exceptions import StageNameUnspecified, StageNotFound
  from .params import StageParams
  from .utils import fill_stage_dependencies, resolve_paths
label_desc: Use image node_id 3 for calling the StageLoader obj's underlying member method code with example usage: obj.fill_from_lock(stage, lock_data) without return types