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.
545705
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;
}
983449
function ensureTrailingDirectorySeparator(path) {
        if (path.charAt(path.length - 1) !== ts.directorySeparator) {
            return path + ts.directorySeparator;
        }
        return path;
    }
12607
function identify(path, callback) {
      return self.identifyLocalImage(path, function(err, info) {
        if (err) {
          return callback(err);
        }
        context.info = info;
        context.extension = info.extension;
        return callback(null);
      });
    }
570517
def get_func_posargs_name(f):
    """"""
    sigparams = inspect.signature(f).parameters
    for p in sigparams:
        if sigparams[p].kind == inspect.Parameter.VAR_POSITIONAL:
            return sigparams[p].name
    return None
306853
public Point getLocation() {
    assertElementNotStale();

    String coordinates =
        debugger.callFunctionOnObject("var coords = " + OperaAtom.GET_LOCATION
                                      + "(locator); return coords.x + ',' + coords.y;", objectId);

    // TODO: The goog.dom.getDocumentScrollElement_() function the Google closure library doesn't
    // return the document for SVG documents. This is used by the above atom. In this case the
    // coordinates string will be empty, so we use this fallback to get the coordinates. Hopefully
    // a fix will be forthcoming in the closure library.
    if (coordinates.isEmpty()) {
      logger.warning("Falling back to non-atom positioning code in getLocation");
      coordinates =
          debugger.callFunctionOnObject("var coords = locator.getBoundingClientRect();"
                                        + "return (coords.left-window.pageXOffset)+','+(coords.top-window.pageYOffset)",
                                        objectId);
    }

    String[] location = coordinates.split(",");
    return new Point(Integer.valueOf(location[0]), Integer.valueOf(location[1]));
  }
595515
def _find_path(start, end, path=tuple()):
    
    path = path + (start, )
    if start is end:
        return path
    else:
        ret = None
        if start.lo is not None:
            ret = _find_path(start.lo, end, path)
        if ret is None and start.hi is not None:
            ret = _find_path(start.hi, end, path)
        return ret
959115
def locate(self, path):
        
        return Zconfig(lib.zconfig_locate(self._as_parameter_, path), False)
669501
def get_location(self):
        
        origin = self._frame.canvas.origin
        return (self._x + origin[0] + self._offset,
                self._y + origin[1] - self._frame.canvas.start_line)
925381
protected String idForPath(Path pluginPath) {
        for (PluginWrapper plugin : plugins.values()) {
            if (plugin.getPluginPath().equals(pluginPath)) {
                return plugin.getPluginId();
            }
        }

        return null;
    }
478107
def find_function(root, function_name):
    
    finder = _FindFunctionVisitor(function_name)
    finder.visit(root)

    if finder.function is None:
        raise KeyError('function not found', function_name)
    return finder.function
1077029
def location_path(cls, project, location):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/locations/{location}",
            project=project,
            location=location,
        )
143535
function (identifier)  {
    var path;
    if (identifier) {
      path = this.constructPath(constants.LOCATIONS, identifier);
      return this.Core.DELETE(path);
    } else {
      return this.rejectRequest('Bad Request: A location identifier is required.');
    }
  }
796105
function findAppPath() {
    if (oars._appPath) return oars._appPath;

    var cwd = process.cwd();
    var argv = process.argv;

    var index = _.findIndex(argv, function(value) {
      return _.startsWith(value, cwd);
    });

    if (index === -1) {
      return cwd;
    } else {
      return path.dirname(argv[index]);
    }
  }
858440
function FileLocation(fullPath, line, chFrom, chTo, id) {
        this.fullPath = fullPath;
        this.line = line;
        this.chFrom = chFrom;
        this.chTo = chTo;
        this.id = id;
    }
499910
function(path) {
			return (
				n.Identifier.check(path.node.callee) &&
				path.node.callee.name === "define" &&
				!n.Program.check(path.parent.parent.node)
			);
		}
235363
def GetFileEntryByPathSpec(self, path_spec):
    
    # Opening a file by identifier is faster than opening a file by location.
    fsapfs_file_entry = None
    location = getattr(path_spec, 'location', None)
    identifier = getattr(path_spec, 'identifier', None)

    if (location == self.LOCATION_ROOT or
        identifier == self.ROOT_DIRECTORY_IDENTIFIER):
      fsapfs_file_entry = self._fsapfs_volume.get_root_directory()
      return apfs_file_entry.APFSFileEntry(
          self._resolver_context, self, path_spec,
          fsapfs_file_entry=fsapfs_file_entry, is_root=True)

    try:
      if identifier is not None:
        fsapfs_file_entry = self._fsapfs_volume.get_file_entry_by_identifier(
            identifier)
      elif location is not None:
        fsapfs_file_entry = self._fsapfs_volume.get_file_entry_by_path(location)

    except IOError as exception:
      raise errors.BackEndError(exception)

    if fsapfs_file_entry is None:
      return None

    return apfs_file_entry.APFSFileEntry(
        self._resolver_context, self, path_spec,
        fsapfs_file_entry=fsapfs_file_entry)
915576
def location(self, x=None, y=None):
        ''' 
        '''
        stream = self._stream
        stream.write(self.save_pos)  # cursor position

        if x is not None and y is not None:
            stream.write(self.mv(y, x))
        elif x is not None:
            stream.write(self.mv_x(x))
        elif y is not None:
            stream.write(self.mv_y(y))

        stream.flush()
        try:
            yield self
        finally:
            stream.write(self.rest_pos)
            stream.flush()