code: function getLocation(func) {
    const location = { ...func.location };
  
    // if the function has an identifier, start the block after it so the
    // identifier is included in the "scope" of its parent
    const identifierEnd = get(func, "identifier.loc.end");
    if (identifierEnd) {
      location.start = identifierEnd;
    }
  
    return location;
  }
docs: Returns the location for a given function path. If the path represents a
  function declaration, the location will begin after the function identifier
  but before the function parameters.