




from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray







def SCREAMING_SNAKE_CASE				(       lowercase_ ,				lowercase_ ,				lowercase_ = False						)   ->       list[float]:



       """simple docstring"""

       if radian_mode:
              return [magnitude * cos(lowercase_						), magnitude * sin(lowercase_						)]
       return [magnitude * cos(radians(lowercase_						)						), magnitude * sin(radians(lowercase_						)						)]







def SCREAMING_SNAKE_CASE				(       lowercase_ ,				lowercase_ ,				lowercase_ = 10**-1						)   ->       bool:



       """simple docstring"""

       A__       =    cross(lowercase_ ,				lowercase_						)
       A__       =    sum(lowercase_						)
       return abs(lowercase_						) < eps


if __name__ == "__main__":
  # Test to check if it works
  _lowerCamelCase	:		Optional[Any]							       =   array(
      [
          polar_force(718.4, 180 - 30),
          polar_force(879.54, 45),
          polar_force(100, -90),
      ]
  )

  _lowerCamelCase	:		NDArray[floataa]							       =   array([[0, 0], [0, 0], [0, 0]])

  assert in_static_equilibrium(forces, location)

  # Problem 1 in image_data/2D_problems.jpg
  _lowerCamelCase	:		Union[str, Any]							       =   array(
      [
          polar_force(30 * 9.81, 15),
          polar_force(215, 180 - 45),
          polar_force(264, 90 - 30),
      ]
  )

  _lowerCamelCase	:		Dict							       =   array([[0, 0], [0, 0], [0, 0]])

  assert in_static_equilibrium(forces, location)

  # Problem in image_data/2D_problems_1.jpg
  _lowerCamelCase	:		Dict							       =   array([[0, -2000], [0, -1200], [0, 15600], [0, -12400]])

  _lowerCamelCase	:		Optional[Any]							       =   array([[0, 0], [6, 0], [10, 0], [12, 0]])

  assert in_static_equilibrium(forces, location)

  import doctest

  doctest.testmod()








def SCREAMING_SNAKE_CASE				(       lowercase_						)   ->       Any:



       """simple docstring"""

       A__       =    [0] * len(lowercase_						)
       A__       =    []
       A__       =    [1] * len(lowercase_						)

       for values in graph.values():
              for i in values:
                     indegree[i] += 1

       for i in range(len(lowercase_						)						):
              if indegree[i] == 0:
                     queue.append(lowercase_						)

       while queue:
              A__       =    queue.pop(0						)
              for x in graph[vertex]:
                     indegree[x] -= 1

                     if long_dist[vertex] + 1 > long_dist[x]:
                            A__       =    long_dist[vertex] + 1

                     if indegree[x] == 0:
                            queue.append(lowercase_						)

       print(max(lowercase_						)						)


# Adjacency list of Graph
_lowerCamelCase	:		Optional[int]							       =   {0: [2, 3, 4], 1: [2, 7], 2: [5], 3: [5, 7], 4: [7], 5: [6], 6: [7], 7: []}
longest_distance(graph)


