code: def detect_complex_func(func):
          
          result = []
          code_complexity = compute_cyclomatic_complexity(func)
  
          if code_complexity > ComplexFunction.MAX_CYCLOMATIC_COMPLEXITY:
              result.append({
                  "func": func,
                  "cause": ComplexFunction.CAUSE_CYCLOMATIC
              })
  
          """Detect the number of external calls in the func
             shouldn't be greater than 5
          """
          count = 0
          for node in func.nodes:
              for ir in node.irs:
                  if isinstance(ir, (HighLevelCall, LowLevelCall, LibraryCall)):
                      count += 1
  
          if count > ComplexFunction.MAX_EXTERNAL_CALLS:
              result.append({
                  "func": func,
                  "cause": ComplexFunction.CAUSE_EXTERNAL_CALL
              })
  
          """Checks the number of the state variables written
             shouldn't be greater than 10
          """
          if len(func.state_variables_written) > ComplexFunction.MAX_STATE_VARIABLES:
              result.append({
                  "func": func,
                  "cause": ComplexFunction.CAUSE_STATE_VARS
              })
  
          return result
docs: Detect the cyclomatic complexity of the contract functions
             shouldn't be greater than 7