code: def inertia(frame, ixx, iyy, izz, ixy=0, iyz=0, izx=0):
      """Simple way to create inertia Dyadic object.
  
      Explanation
      ===========
  
      Creates an inertia Dyadic based on the given tensor values and a body-fixed
      reference frame.
  
      Parameters
      ==========
  
      frame : ReferenceFrame
          The frame the inertia is defined in.
      ixx : Sympifyable
          The xx element in the inertia dyadic.
      iyy : Sympifyable
          The yy element in the inertia dyadic.
      izz : Sympifyable
          The zz element in the inertia dyadic.
      ixy : Sympifyable
          The xy element in the inertia dyadic.
      iyz : Sympifyable
          The yz element in the inertia dyadic.
      izx : Sympifyable
          The zx element in the inertia dyadic.
  
      Examples
      ========
  
      >>> from sympy.physics.mechanics import ReferenceFrame, inertia
      >>> N = ReferenceFrame('N')
      >>> inertia(N, 1, 2, 3)
      (N.x|N.x) + 2*(N.y|N.y) + 3*(N.z|N.z)
  
      """
  
      if not isinstance(frame, ReferenceFrame):
          raise TypeError("Need to define the inertia in a frame")
      ixx, iyy, izz = sympify(ixx), sympify(iyy), sympify(izz)
      ixy, iyz, izx = sympify(ixy), sympify(iyz), sympify(izx)
      return (
          ixx * (frame.x | frame.x)
          + ixy * (frame.x | frame.y)
          + izx * (frame.x | frame.z)
          + ixy * (frame.y | frame.x)
          + iyy * (frame.y | frame.y)
          + iyz * (frame.y | frame.z)
          + izx * (frame.z | frame.x)
          + iyz * (frame.z | frame.y)
          + izz * (frame.z | frame.z)
      )
  
file_path: sympy/sympy/physics/mechanics/inertia.py
imports: from sympy import sympify
  from sympy.physics.vector import Point, Dyadic, ReferenceFrame
  from collections import namedtuple
label_desc: Use image node_id 1 for calling a global function with example usage: inertia(frame, ixx, iyy, izz, ixy, iyz, izx) and returns: unknown