import os
import carb
import carb.settings
import omni.kit.commands
from pxr import Usd, Sdf, UsdGeom, Gf, Tf, UsdShade, UsdLux


def create_test_stage():
    stage = omni.usd.get_context().get_stage()
    rootname = ""
    if stage.HasDefaultPrim():
       rootname = stage.GetDefaultPrim().GetPath().pathString

    prim_path = "{}/defaultLight".format(rootname)

    # Create basic DistantLight
    omni.kit.commands.execute(
        "CreatePrim",
        prim_path=prim_path,
        prim_type="DistantLight",
        select_new_prim=False,
        attributes={UsdLux.Tokens.angle: 1.0, UsdLux.Tokens.intensity: 3000},
        create_default_xform=True,
    )

    return prim_path
