def _download_swagger(self, location):
if not location:<EOL><INDENT>return<EOL><DEDENT>bucket, key, version = self._parse_s3_location(location)<EOL>if bucket and key:<EOL><INDENT>LOG.debug("<STR_LIT>", bucket, key, version)<EOL>swagger_str = self._download_from_s3(bucket, key, version)<EOL>return yaml_parse(swagger_str)<EOL><DEDENT>if not isinstance(location, string_types):<EOL><INDENT>LOG.debug("<STR_LIT>", location)<EOL>return<EOL><DEDENT>filepath = location<EOL>if self.working_dir:<EOL><INDENT>filepath = os.path.join(self.working_dir, location)<EOL><DEDENT>if not os.path.exists(filepath):<EOL><INDENT>LOG.debug("<STR_LIT>", filepath)<EOL>return<EOL><DEDENT>LOG.debug("<STR_LIT>", filepath)<EOL>with open(filepath, "<STR_LIT:r>") as fp:<EOL><INDENT>return yaml_parse(fp.read())<EOL><DEDENT>
Download the file from given local or remote location and return it

Parameters
----------
location : str or dict
    Local path or S3 path to Swagger file to download. Consult the ``__init__.py`` documentation for specifics
    on structure of this property.

Returns
-------
dict or None
    Downloaded and parsed Swagger document. None, if unable to download