#NEWLINE# def _extract_relative_path( base_url , image_path ) : #NEWLINE# #INDENT# 'Extract path relative to the base url, without leading slash\n\n    Args:\n        base_url (str):\n            The base url to remove\n        image_path (str):\n            Path that may or may not start with ``base_url``\n\n    Returns:\n        str:\n            The relative path\n    ' #NEWLINE# if image_path . startswith ( base_url ) : #NEWLINE# #INDENT# image_path = image_path [ len ( base_url ) : ] #NEWLINE# #UNINDENT# return ( image_path [ 1 : ] if image_path . startswith ( '/' ) else image_path )