code: def create_rung_from_points(
      points: Sequence[Any] | np.ndarray, n_trials: int, resources: int
  ) -> RungDict:
      results = {}
      for param in points:
          trial = create_trial_for_hb(
              (resources, param), objective=param
          )
          trial_hash = trial.compute_trial_hash(
              trial,
              ignore_fidelity=True,
          )
          assert trial.objective is not None
          results[trial_hash] = (trial.objective.value, trial)
  
      return RungDict(
          n_trials=n_trials, resources=resources, results=results
      )
  
imports: from __future__ import annotations
  import copy
  import logging
  import typing
  from typing import Any, ClassVar, Sequence
  import numpy
  import pytest
  from orion.algo.hyperband import BudgetTuple, Hyperband, HyperbandBracket, RungDict, compute_budgets
  from orion.algo.space import Fidelity, Integer, Real, Space
  from orion.core.utils.flatten import flatten
  from orion.core.worker.primary_algo import SpaceTransform
  from orion.core.worker.trial import Trial
  from orion.testing.algo import BaseAlgoTests, TestPhase
  from orion.testing.trial import compare_trials, create_trial
label_desc: Use image node_id 2 for calling a global function with example usage: create_rung_from_points(points, n_trials, resources) and returns: RungDict