code: def is_convex(f, *syms, domain=S.Reals):
      r"""Determines the  convexity of the function passed in the argument.
  
      Parameters
      ==========
  
      f : :py:class:`~.Expr`
          The concerned function.
      syms : Tuple of :py:class:`~.Symbol`
          The variables with respect to which the convexity is to be determined.
      domain : :py:class:`~.Interval`, optional
          The domain over which the convexity of the function has to be checked.
          If unspecified, S.Reals will be the default domain.
  
      Returns
      =======
  
      bool
          The method returns ``True`` if the function is convex otherwise it
          returns ``False``.
  
      Raises
      ======
  
      NotImplementedError
          The check for the convexity of multivariate functions is not implemented yet.
  
      Notes
      =====
  
      To determine concavity of a function pass `-f` as the concerned function.
      To determine logarithmic convexity of a function pass `\log(f)` as
      concerned function.
      To determine logarithmic concavity of a function pass `-\log(f)` as
      concerned function.
  
      Currently, convexity check of multivariate functions is not handled.
  
      Examples
      ========
  
      >>> from sympy import is_convex, symbols, exp, oo, Interval
      >>> x = symbols('x')
      >>> is_convex(exp(x), x)
      True
      >>> is_convex(x**3, x, domain = Interval(-1, oo))
      False
      >>> is_convex(1/x**2, x, domain=Interval.open(0, oo))
      True
  
      References
      ==========
  
      .. [1] https://en.wikipedia.org/wiki/Convex_function
      .. [2] http://www.ifp.illinois.edu/~angelia/L3_convfunc.pdf
      .. [3] https://en.wikipedia.org/wiki/Logarithmically_convex_function
      .. [4] https://en.wikipedia.org/wiki/Logarithmically_concave_function
      .. [5] https://en.wikipedia.org/wiki/Concave_function
  
      """
  
      if len(syms) > 1:
          raise NotImplementedError(
              "The check for the convexity of multivariate functions is not implemented yet."
          )
  
      from sympy.solvers.inequalities import solve_univariate_inequality
  
      f = _sympify(f)
      var = syms[0]
      if any(s in domain for s in singularities(f, var)):
          return False
  
      condition = f.diff(var, 2) < 0
      if solve_univariate_inequality(condition, var, False, domain):
          return False
      return True
  
imports: from .accumulationbounds import AccumBounds, AccumulationBounds
  from .singularities import singularities
  from sympy.core import Pow, S
  from sympy.core.function import diff, expand_mul, Function
  from sympy.core.kind import NumberKind
  from sympy.core.mod import Mod
  from sympy.core.numbers import equal_valued
  from sympy.core.relational import Relational
  from sympy.core.symbol import Symbol, Dummy
  from sympy.core.sympify import _sympify
  from sympy.functions.elementary.complexes import Abs, im, re
  from sympy.functions.elementary.exponential import exp, log
  from sympy.functions.elementary.integers import frac
  from sympy.functions.elementary.piecewise import Piecewise
  from sympy.functions.elementary.trigonometric import TrigonometricFunction, sin, cos, tan, cot, csc, sec, asin, acos, acot, atan, asec, acsc
  from sympy.functions.elementary.hyperbolic import sinh, cosh, tanh, coth, sech, csch, asinh, acosh, atanh, acoth, asech, acsch
  from sympy.polys.polytools import degree, lcm_list
  from sympy.sets.sets import Interval, Intersection, FiniteSet, Union, Complement
  from sympy.sets.fancysets import ImageSet
  from sympy.sets.conditionset import ConditionSet
  from sympy.utilities import filldedent
  from sympy.utilities.iterables import iterable
label_desc: Use image node_id 7 for calling a global function with example usage: is_convex(f) and returns: True, False, False