'Get or create a sensor with the given unique name and zero or
more parent sensors. All parent sensors will receive every value
recorded with this sensor.
Arguments:
name (str): The name of the sensor
config (MetricConfig, optional): A default configuration to use
for this sensor for metrics that don\'t have their own config
inactive_sensor_expiration_time_seconds (int, optional):
If no value if recorded on the Sensor for this duration of
time, it is eligible for removal
parents (list of Sensor): The parent sensors
Returns:
Sensor: The sensor that is created'

def sensor(self, name, config=None, inactive_sensor_expiration_time_seconds=sys.maxsize, parents=None):

    sensor = self.get_sensor(name)
    if sensor:
        return sensor
    with self._lock:
        sensor = self.get_sensor(name)
        if (not sensor):
            sensor = Sensor(self, name, parents, (config or self.config), inactive_sensor_expiration_time_seconds)
            self._sensors[name] = sensor
            if parents:
                for parent in parents:
                    children = self._children_sensors.get(parent)
                    if (not children):
                        children = []
                        self._children_sensors[parent] = children
                    children.append(sensor)
            logger.debug('Added    sensor    with    name    %s', name)
        return sensor
