'Returns a FileDescriptorProto from a FileDescriptor object.'

@classmethod
def _GetFileDescriptorProto(cls, file_descriptor):

    fd_proto = descriptor_pb2.FileDescriptorProto()
    file_descriptor.CopyToProto(fd_proto)
    fd_proto.ClearField('dependency')
    for dep in file_descriptor.dependencies:
        fd_proto.dependency.append(dep.name)
    return fd_proto
