code: def test_GitRepo_files_decorator():
      class testclass(object):
          def __init__(self):
              self.path = op.join("some", "where")
  
          # TODO
          # yoh:  logic is alien to me below why to have two since both look identical!
          @normalize_paths
          def decorated_many(self, files):
              return files
  
          @normalize_paths
          def decorated_one(self, file_):
              return file_
  
      test_instance = testclass()
  
      # When a single file passed -- single path returned
      obscure_filename = get_most_obscure_supported_name()
      file_to_test = op.join(
          test_instance.path, "deep", obscure_filename
      )
      # file doesn't exist
      eq_(
          test_instance.decorated_one(file_to_test),
          _normalize_path(test_instance.path, file_to_test),
      )
      eq_(
          test_instance.decorated_one(file_to_test),
          _normalize_path(test_instance.path, file_to_test),
      )
  
      file_to_test = obscure_filename
      eq_(
          test_instance.decorated_many(file_to_test),
          _normalize_path(test_instance.path, file_to_test),
      )
      eq_(
          test_instance.decorated_one(file_to_test),
          _normalize_path(test_instance.path, file_to_test),
      )
  
      file_to_test = op.join(obscure_filename, "beyond", "obscure")
      eq_(
          test_instance.decorated_many(file_to_test),
          _normalize_path(test_instance.path, file_to_test),
      )
  
      file_to_test = op.join(
          getpwd(), "somewhere", "else", obscure_filename
      )
      assert_raises(
          FileNotInRepositoryError,
          test_instance.decorated_many,
          file_to_test,
      )
  
      # If a list passed -- list returned
      files_to_test = ["now", op.join("a list", "of"), "paths"]
      expect = []
      for item in files_to_test:
          expect.append(_normalize_path(test_instance.path, item))
      eq_(test_instance.decorated_many(files_to_test), expect)
  
      eq_(test_instance.decorated_many(""), [])
  
      assert_raises(ValueError, test_instance.decorated_many, 1)
      assert_raises(ValueError, test_instance.decorated_one, 1)
  
imports: import logging
  import os
  import os.path
  import sys
  import pytest
  from datalad import get_encoding_info
  from datalad.cmd import StdOutCapture, StdOutErrCapture, WitlessRunner
  from datalad.support.exceptions import CommandError, FileNotInRepositoryError, InvalidGitRepositoryError, NoSuchPathError, PathKnownToRepositoryError
  from datalad.support.external_versions import external_versions
  from datalad.support.gitrepo import GitRepo, _normalize_path, normalize_paths, to_options
  from datalad.support.sshconnector import get_connection_hash
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, DEFAULT_REMOTE, SkipTest, assert_cwd_unchanged, assert_equal, assert_false, assert_in, assert_in_results, assert_is_instance, assert_not_equal, assert_not_in, assert_raises, assert_repo_status, assert_true, create_tree, eq_, get_most_obscure_supported_name, integration, neq_, ok_, skip_if_no_network, skip_if_on_windows, skip_nomultiplex_ssh, slow, swallow_logs, with_tempfile, with_tree, xfail_buggy_annex_info
  from datalad.utils import Path, chpwd, getpwd, on_windows, rmtree
label_desc: Use image node_id 14 for calling a global function with example usage: test_GitRepo_files_decorator() and returns: files, file_