<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_edgerc(rcinput, section='default'):
 """Returns an EdgeGridAuth object from the configuration from the given section of the given edgerc file. :param filename: path to the edgerc file :param section: the section to use (this is the [bracketed] part of the edgerc, default is 'default') """

        from .edgerc import EdgeRc 
        if isinstance(rcinput, EdgeRc):
            rc = rcinput
        else:
            rc = EdgeRc(rcinput)

        return EdgeGridAuth(
            client_token=rc.get(section, 'client_token'),
            client_secret=rc.get(section, 'client_secret'),
            access_token=rc.get(section, 'access_token'),
            headers_to_sign=rc.getlist(section, 'headers_to_sign'),
            max_body=rc.getint(section, 'max_body')
        )