def METHOD_NAME(self, object_name, inner=False):
    """Calculate the extremity of an object in the radial direction.
    Parameters
    ----------
    object_name : str
        name of the object from which to calculate the radius.
    inner : bool, optional
        The default is ``False``.
    Returns
    -------
    float
        Radius value.
        .. note::
            If ``inner=True``, then the maximum is returned; otherwise,
            the minimum is returned.
    """
    radius = 0
    oVertexIDs = self[object_name].vertices
    if oVertexIDs:
        if inner:
            radius = 0
        else:
            radius = 1e9
        for vertex in oVertexIDs:
            pos = vertex.position
            vertex_radius = math.sqrt(float(pos[0]) ** 2 + float(pos[1]) ** 2)
            if inner:
                if vertex_radius > radius:
                    radius = vertex_radius
            else:
                if vertex_radius < radius:
                    radius = vertex_radius
    elif self[object_name].edges:
        radius = self[object_name].edges[0].length / (2 * math.pi)
    return radius