code: def test_get_projects_with_given_namespace(self, _):
      # given
      api_projects = [a_project(), a_project()]
  
      # and
      backend = MagicMock()
      leaderboard = MagicMock()
      backend.get_projects.return_value = api_projects
      backend.create_leaderboard_backend.return_value = leaderboard
  
      # and
      session = Session(backend=backend)
  
      # and
      custom_namespace = "custom_namespace"
  
      # when
      projects = session.get_projects(custom_namespace)
  
      # then
      expected_projects = OrderedDict(
          (
              custom_namespace + "/" + p.name,
              Project(leaderboard, p.id, custom_namespace, p.name),
          )
          for p in api_projects
      )
      self.assertEqual(expected_projects, projects)
  
      # and
      backend.get_projects.assert_called_with(custom_namespace)
  
file_path: neptune-client/tests/unit/neptune/legacy/test_session.py
imports: import unittest
  from collections import OrderedDict
  from mock import MagicMock, patch
  from neptune.legacy.projects import Project
  from neptune.legacy.sessions import Session
  from tests.unit.neptune.legacy.api_objects_factory import a_project
label_desc: Use image node_id 1 for calling the TestSession obj's underlying member method code with example usage: obj.test_get_projects_with_given_namespace(_) without return types