code: def sim_sun_flare(
      tens: Tensor,
      flare_center: int = -1,
      angle: int = -1,
      num_flare_circles: int = 8,
      src_radius: int = 400,
      src_color: Tuple = (255, 255, 255),
  ) -> Tensor:
      r"""
          Add a source of light (flare) on an specific region of an image.
  
      Args:
          tens (Tensor) : Any regular ``caer.Tensor``.
          flare_center (int): Center of the flare. Default: -1.
          angle (int): Angle of the flare. Default: -1
          num_flare_circles (int): Number of flare circles to operate on.
          src_radius (int): Intended size of the flare
          src_color (tuple): Intended source color of the flare
  
      Returns:
          Tensor of shape ``(height, width, channels)``.
  
      Examples::
  
          >> tens = caer.data.sunrise
          >> filtered = caer.filters.sim_sun_flare(tens)
          >> filtered
          (427, 640, 3)
  
      """
      if angle != -1:
          angle = angle % (2 * math.pi)  # type: ignore
  
      if not (num_flare_circles >= 0 and num_flare_circles <= 20):
          raise ValueError("Numeric value must be between 0 and 20")
  
      imshape = tens.shape
      if angle == -1:
          angle_t = random.uniform(0, 2 * math.pi)
          if angle_t == math.pi / 2:
              angle_t = 0
      else:
          angle_t = angle
  
      if flare_center == -1:
          flare_center_t = (random.randint(0, imshape[1]), random.randint(0, imshape[0] // 2))  # type: ignore
      else:
          flare_center_t = flare_center  # type: ignore
  
      x, y = _add_sun_flare_line(flare_center_t, angle_t, imshape)
  
      return _add_sun_process(
          tens,
          num_flare_circles,
          flare_center_t,
          src_radius,
          x,
          y,
          src_color,
      )
  
file_path: caer/caer/transforms/simulate.py
imports: import numpy
  import cv2
  import random
  import math
  from ..coreten import Tensor, is_tensor
  from ..annotations import Tuple, Optional, Union
  from .functional import is_numeric, is_numeric_list_or_tuple, is_tuple, _rgb, _snow_process, _generate_random_lines, _rain_process, _generate_random_blur_coordinates, _add_blur, _gravel_process, _add_sun_flare_line, _add_sun_process, _apply_motion_blur, _autumn_process, _shadow_process
label_desc: Use image node_id 5 for calling a global function with example usage: sim_sun_flare(tens, flare_center, angle, num_flare_circles, src_radius, src_color) and returns: _add_sun_process