<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def baredoc(obj):
 """Return the first line of the docstring of an object. Trailing periods and spaces as well as leading spaces are removed from the output. Args: obj: any Python object. Returns: str: the first line of the docstring of obj. """

    doc = getdoc(obj)
    if not doc:
        return ''
    doc = doc.splitlines()[0]
    return doc.rstrip(' .').lstrip()