code: def get_decorators(func):
      
      decorators = []
      # Parse the source code of the function with ast to find the names of
      # all of its decorators.
      tree = ast.parse(inspect.getsource(func))
      for node in ast.iter_child_nodes(tree):
          for dnode in node.decorator_list:
              if isinstance(dnode, ast.Name):
                  decorator = func.func_globals[dnode.id]
              elif isinstance(dnode, ast.Attribute):
                  module = func.func_globals[dnode.value.id]
                  decorator = getattr(module, dnode.attr)
              else:
                  raise Exception("Unable to handle decorator node: %s" % dnode)
              decorators.append(decorator)
      return decorators
docs: Return a list of decorator names for this function.