code: def postclone_preannex_cfg_ria(ds, remote="origin"):
      # We need to annex-ignore the remote before annex-init is called on the clone,
      # due to issues 5186 and 5253 (and we would have done it afterwards anyway).
      # annex/objects in RIA stores is special for several reasons.
      # 1. the remote doesn't know about it (no actual local annex for the remote)
      # 2. RIA may use hashdir mixed, copying data to it via git-annex (if cloned
      #    via ssh or local) would make it see a bare repo and establish a
      #    hashdir lower annex object tree.
      # 3. We want the ORA remote to receive all data for the store, so its
      #    objects could be moved into archives (the main point of a RIA store).
  
      # Note, that this function might need an enhancement as theoretically a RIA
      # store could also hold simple standard annexes w/o an intended ORA remote.
      # This needs the introduction of a new version label in RIA datasets, making
      # the following call conditional.
      ds.config.set(
          f"remote.{remote}.annex-ignore", "true", scope="local"
      )
  
imports: import logging
  import re
  from os.path import expanduser
  from pathlib import Path
  from typing import Dict, List, Tuple
  from urllib.parse import unquote
  from datalad.cmd import CommandError, GitWitlessRunner, StdOutCapture
  from datalad.config import ConfigManager
  from datalad.distributed.ora_remote import LocalIO, RIARemoteError, SSHRemoteIO
  from datalad.distribution.dataset import Dataset
  from datalad.distribution.utils import _get_flexible_source_candidates
  from datalad.dochelpers import single_or_plural
  from datalad.log import log_progress
  from datalad.runner.exception import CommandError
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import CapturedException, DownloadError
  from datalad.support.gitrepo import GitRepo
  from datalad.support.network import RI, SSHRI, URL, DataLadRI, download_url, get_local_file_url, is_url
  from datalad.support.strings import get_replacement_dict
  from datalad.utils import Path, PurePosixPath, ensure_bool, ensure_list, make_tempfile, rmtree
label_desc: Use image node_id 1 for calling a global function with example usage: postclone_preannex_cfg_ria(ds, remote) without return types