class_docstr: Scenes hold Assets and are the main interface used by Views (such as Renderers).
  
  Each scene has global properties:
    * frame_start
    * frame_end
    * frame_rate
    * step_rate
    * resolution  (width, height)
    * gravity
    * camera
    * global_illumination
    * background
  
  The scene also links to views such as the simulator or the renderer.
  Whenever an Asset is added via `scene.add(asset)` it is also added to all
  linked views.
class_docstr_tok: ["Scenes","hold","Assets","and","are","the","main","interface","used","by","Views","(","such","as","Renderers",")",".","Each","scene","has","global","properties",":","*","frame_start","*","frame_end","*","frame_rate","*","step_rate","*","resolution","(","width",",","height",")","*","gravity","*","camera","*","global_illumination","*","background","The","scene","also","links","to","views","such","as","the","simulator","or","the","renderer",".","Whenever","an","Asset","is","added","via","`","scene.add","(","asset",")","`","it","is","also","added","to","all","linked","views","."]
code: def from_flags(flags):
      if isinstance(flags.resolution, str):
          resolution = tuple(
              int(x) for x in flags.resolution.split("x")
          )
          if len(resolution) == 1:
              resolution = (resolution[0], resolution[0])
      elif isinstance(flags.resolution, int):
          resolution = (flags.resolution, flags.resolution)
      else:
          resolution = tuple(flags.resolution)
      assert len(resolution) == 2, flags.resolution
      assert all(isinstance(x, int) for x in resolution)
  
      return Scene(
          frame_start=flags.frame_start,
          frame_end=flags.frame_end,
          frame_rate=flags.frame_rate,
          step_rate=flags.step_rate,
          resolution=resolution,
      )
  
imports: from typing import Tuple, Union, List
  import traitlets
  import kubric
  from kubric.utils import next_global_count
  from kubric.core import color
  from kubric.core import traits
  from kubric.core.assets import Asset
  from kubric.core.assets import UndefinedAsset
  from kubric.core.cameras import Camera
  from kubric.core.cameras import UndefinedCamera
  from kubric.core.objects import Object3D
label_desc: Use image node_id 14 for calling the Scene obj's underlying member method code with example usage: obj.from_flags(flags) and returns: Scene