code: def parse_cl_function(cl_code, dependencies=()):
      
      from mot.lib.cl_function import SimpleCLFunction
  
      def separate_cl_functions(input_str):
          """Separate all the OpenCL functions.
  
          This creates a list of strings, with for each function found the OpenCL code.
  
          Args:
              input_str (str): the string containing one or more functions.
  
          Returns:
              list: a list of strings, with one string per found CL function.
          """
          class Semantics:
  
              def __init__(self):
                  self._functions = []
  
              def result(self, ast):
                  return self._functions
  
              def arglist(self, ast):
                  return '({})'.format(', '.join(ast))
  
              def function(self, ast):
                  def join(items):
                      result = ''
                      for item in items:
                          if isinstance(item, str):
                              result += item
                          else:
                              result += join(item)
                      return result
  
                  self._functions.append(join(ast).strip())
                  return ast
  
          return _extract_cl_functions_parser.parse(input_str, semantics=Semantics())
  
      functions = separate_cl_functions(cl_code)
      return SimpleCLFunction.from_string(functions[-1], dependencies=list(dependencies or []) + [
          SimpleCLFunction.from_string(s) for s in functions[:-1]])
docs: Parse the given OpenCL string to a single SimpleCLFunction.
  
      If the string contains more than one function, we will return only the last, with all the other added as a
      dependency.
  
      Args:
          cl_code (str): the input string containing one or more functions.
          dependencies (Iterable[CLCodeObject]): The list of CL libraries this function depends on
  
      Returns:
          mot.lib.cl_function.SimpleCLFunction: the CL function for the last function in the given strings.