def sg_get_context():
    r"""Get current context information

    Returns:
      tf.sg_opt class object which contains all context information
    """

    global _context

    # merge current context
    res = tf.sg_opt()
    for c in _context:
        res += c

    return res
r"""Get current context information

    Returns:
      tf.sg_opt class object which contains all context information