function isDecoratedFunction(path) {
  return path.match(
    (node) =>
      node.type === "ArrowFunctionExpression" &&
      node.body.type === "BlockStatement",
    (node, name) => {
      if (
        node.type === "CallExpression" &&
        name === "arguments" &&
        node.arguments.length === 1 &&
        node.callee.type === "CallExpression"
      ) {
        const decorator = node.callee.callee;
        return (
          decorator.type === "Identifier" ||
          (decorator.type === "MemberExpression" &&
            !decorator.computed &&
            decorator.object.type === "Identifier" &&
            decorator.property.type === "Identifier")
        );
      }
      return false;
    },
    (node, name) =>
      (node.type === "VariableDeclarator" && name === "init") ||
      (node.type === "ExportDefaultDeclaration" && name === "declaration") ||
      (node.type === "TSExportAssignment" && name === "expression") ||
      (node.type === "AssignmentExpression" &&
        name === "right" &&
        node.left.type === "MemberExpression" &&
        node.left.object.type === "Identifier" &&
        node.left.object.name === "module" &&
        node.left.property.type === "Identifier" &&
        node.left.property.name === "exports"),
    (node) =>
      node.type !== "VariableDeclaration" ||
      (node.kind === "const" && node.declarations.length === 1),
  );
}
The "decorated function" pattern.
The arrow function should be kept hugged even if its signature breaks.

```
const decoratedFn = decorator(param1, param2)((
  ...
) => {
  ...
});
```
@param {AstPath} path