code: def is_start_of_function(text):
      
      if isinstance(text, str) or isinstance(text, unicode):
          function_prefix = ['def', 'async def']
          text = text.lstrip()
  
          for prefix in function_prefix:
              if text.startswith(prefix):
                  return True
  
      return False
docs: Return True if text is the beginning of the function definition.