<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def features_from_game_info( game_info, use_feature_units=False, use_raw_units=False, action_space=None, hide_specific_actions=True, use_unit_counts=False, use_camera_position=False):
 """Construct a Features object using data extracted from game info. Args: game_info: A `sc_pb.ResponseGameInfo` from the game. use_feature_units: Whether to include the feature unit observation. use_raw_units: Whether to include raw unit data in observations. This differs from feature_units because it includes units outside the screen and hidden units, and because unit positions are given in terms of world units instead of screen units. action_space: If you pass both feature and rgb sizes, then you must also specify which you want to use for your actions as an ActionSpace enum. hide_specific_actions: [bool] Some actions (eg cancel) have many specific versions (cancel this building, cancel that spell) and can be represented in a more general form. If a specific action is available, the general will also be available. If you set `hide_specific_actions` to False, the specific versions will also be available, but if it's True, the specific ones will be hidden. Similarly, when transforming back, a specific action will be returned as the general action. This simplifies the action space, though can lead to some actions in replays not being exactly representable using only the general actions. use_unit_counts: Whether to include unit_counts observation. Disabled by default since it gives information outside the visible area. use_camera_position: Whether to include the camera's position (in world units) in the observations. Returns: A features object matching the specified parameterisation. """


  if game_info.options.HasField("feature_layer"):
    fl_opts = game_info.options.feature_layer
    feature_dimensions = Dimensions(
        screen=(fl_opts.resolution.x, fl_opts.resolution.y),
        minimap=(fl_opts.minimap_resolution.x, fl_opts.minimap_resolution.y))
  else:
    feature_dimensions = None

  if game_info.options.HasField("render"):
    rgb_opts = game_info.options.render
    rgb_dimensions = Dimensions(
        screen=(rgb_opts.resolution.x, rgb_opts.resolution.y),
        minimap=(rgb_opts.minimap_resolution.x, rgb_opts.minimap_resolution.y))
  else:
    rgb_dimensions = None

  map_size = game_info.start_raw.map_size
  camera_width_world_units = game_info.options.feature_layer.width

  return Features(
      agent_interface_format=AgentInterfaceFormat(
          feature_dimensions=feature_dimensions,
          rgb_dimensions=rgb_dimensions,
          use_feature_units=use_feature_units,
          use_raw_units=use_raw_units,
          use_unit_counts=use_unit_counts,
          use_camera_position=use_camera_position,
          camera_width_world_units=camera_width_world_units,
          action_space=action_space,
          hide_specific_actions=hide_specific_actions),
      map_size=map_size)