code: def _place_filekey_managed(finfo, str_src, dest, str_dest, dest_repo):
      # TODO put in effect, when salted backends are a thing, until then
      # avoid double-computing the file hash
      # if finfo.get('has_content', True):
      #    dest_key = dest_repo.call_git_oneline(['annex', 'calckey', str_src])
      dest_key = finfo["key"]
      if not finfo.get("has_content", True):
          return dict(
              path=str_dest,
              status="error",
              message=(
                  "Cannot create file in managed branch without file content."
                  "Missing for: %s",
                  str_src,
              ),
          )
      _replace_file(
          finfo["objloc"], dest, str_dest, follow_symlinks=True
      )
      return dest_key
  
imports: import logging
  import os.path
  from shutil import copyfile
  import sys
  from datalad.interface.base import Interface
  from datalad.interface.base import build_doc, eval_results
  from datalad.support.constraints import EnsureStr, EnsureNone
  from datalad.interface.common_opts import save_message_opt
  from datalad.support.param import Parameter
  from datalad.distribution.dataset import Dataset, require_dataset
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import CapturedException
  from datalad.utils import ensure_list, get_dataset_root, Path
  from datalad.distribution.dataset import EnsureDataset, datasetmethod, resolve_path
  from functools import lru_cache
label_desc: Use image node_id 7 for calling a global function with example usage: _place_filekey_managed(finfo, str_src, dest, str_dest, dest_repo) and returns: dest_key, dict