code: def test_bipedal_walker_hardcore_creation(seed: int):
      """Test BipedalWalker hardcore creation.
  
      BipedalWalker with `hardcore=True` should have ladders
      stumps and pitfalls. A convenient way to identify if ladders,
      stumps and pitfall are created is checking whether the terrain
      has that particular terrain color.
  
      Args:
          seed (int): environment seed
      """
      HC_TERRAINS_COLOR1 = (255, 255, 255)
      HC_TERRAINS_COLOR2 = (153, 153, 153)
  
      env = gym.make(
          "BipedalWalker-v3", disable_env_checker=True
      ).unwrapped
      hc_env = gym.make(
          "BipedalWalkerHardcore-v3", disable_env_checker=True
      ).unwrapped
      assert isinstance(env, BipedalWalker) and isinstance(
          hc_env, BipedalWalker
      )
      assert env.hardcore is False and hc_env.hardcore is True
  
      env.reset(seed=seed)
      hc_env.reset(seed=seed)
  
      for terrain in env.terrain:
          assert terrain.color1 != HC_TERRAINS_COLOR1
          assert terrain.color2 != HC_TERRAINS_COLOR2
  
      hc_terrains_color1_count = 0
      hc_terrains_color2_count = 0
      for terrain in hc_env.terrain:
          if terrain.color1 == HC_TERRAINS_COLOR1:
              hc_terrains_color1_count += 1
          if terrain.color2 == HC_TERRAINS_COLOR2:
              hc_terrains_color2_count += 1
  
      assert hc_terrains_color1_count > 0
      assert hc_terrains_color2_count > 0
  
file_path: gym/tests/envs/test_env_implementation.py
imports: from typing import Optional
  import numpy
  import pytest
  import gym
  from gym.envs.box2d import BipedalWalker
  from gym.envs.box2d.lunar_lander import demo_heuristic_lander
  from gym.envs.toy_text import TaxiEnv
  from gym.envs.toy_text.frozen_lake import generate_random_map
label_desc: Use image node_id 3 for calling a global function with example usage: test_bipedal_walker_hardcore_creation(seed) without return types