def _get_location_descriptor(self, location):
loc_descriptor = None<EOL>if isinstance(location, basestring):<EOL><INDENT>loc_descriptor = LocationDescriptor(location)<EOL><DEDENT>elif isinstance(location, LocationDescriptor):<EOL><INDENT>loc_descriptor = location<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>return loc_descriptor<EOL>
Get corresponding :class:`LocationDescriptor` object from a string or a :class:`LocationDescriptor` itself.

Args:
    location: a string or a :class:`LocationDescriptor`.

Returns:
    A corresponding :class:`LocationDescriptor` object. If ``location`` is a :class:`LocationDescriptor`,
    we simply return it.

Raises:
    A ``RuntimeError`` is raised whenever the `location` object is not recognized a string or :class:`self._nbr_of_nodes`.